If you have Linux you should use ALSA. And you do have a solution if you use Linux, by using the ALSA softvol pluging. Go to softvol. This is an alsa plugin that allows you to do exactly that.
See also here.