Link a mixer to a software forever

OSS related discussion in general (i.e. not limited to Linux/Solaris/BSD)

Moderators: cesium, dev, kodachi, hannu

Link a mixer to a software forever

Postby Thom1 » Sun Nov 20, 2011 10:00 am

Hi,

I'm a new user of oss, I don't speak english very well, so if my question seems stupid or hard to understand, I'm sorry.

I'm a linux user and I always use alsa drivers. I like the idea there is one mixer per software with oss, that's why I want to use it.
I can see there are vmix0.pcm9 to vmix.pcm12 by default. So when I listen music with mpd, it will use the first mixer available vmix0.pcm9, then I ajust the level volume like I want. Then I switch mpd to pause mode, vmix0.pcm9 is now available for any software. I watch a video with mplayer and of course it uses the same mixer vmix0.pcm9, I ajust the level volume because I don't hear anything. Then I stop mplayer and play again mpd. Of course mpd screams because the level of vmix0.pcm9 is very high. It's a problem for me.

My idea is to "link" a mixer to a software forever. For example I'd like mpd uses only vmix0.pcm9 and when this mixer is available (mpd is not playing) I don't want it used by any other software. Is it possible ?

Thanks to read me.
Thom1
New Member
 
Posts: 2
Joined: Sun Nov 20, 2011 9:45 am

Re: Link a mixer to a software forever

Postby cesium » Sun Nov 20, 2011 12:55 pm

Yeah, this is an annoyance... There may be some ways around it. ossmix can accept a software name argument (e.g. "ossmix mpd 10") and resolve it to the vmix pcm used by the software (i.e. mpd's pcm volume would be set to 10, regardless whether it's vmix0.pcm9 or vmix0.pcm12 etc.). A wrapper script around mpd may achieve what you desire. (I had a patch to ossxmix for this somewhere too).

Another solution would be to patch mpd to not close and reopen the output when pausing, but to use SNDCTL_DSP_RESET and the like...
cesium
Developer
 
Posts: 902
Joined: Sun Aug 12, 2007 12:51 am

Re: Link a mixer to a software forever

Postby Thom1 » Sun Nov 20, 2011 1:20 pm

cesium wrote:(I had a patch to ossxmix for this somewhere too).

Can you post your patch please ?
Thom1
New Member
 
Posts: 2
Joined: Sun Nov 20, 2011 9:45 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron