Re: Switching sound cards on the fly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Thu, 15 Mar 2007 21:29:32 -0400,
Lee Revell wrote:
> 
> How difficult would it be to add to alsa-lib a mechanism where
> applications can register an "ALSA config changed" callback that would
> be invoked when an app like gnome-sound-properties changes the default
> sound device by updating .asoundrc?  Changes to ALSA config files
> could be detected via inotify.
> 
> I think this could allow for relatively seamless switching of the
> audio output device.

It's an interesting idea.

I don't think alsa-lib would do any dynamic configuration change by
itself because it can result in inconsistency.  Instead, when the
config-change is notified, the app should do the following procedure
by itself:

- finish jobs, close handles
- reset the config
- restart jobs

Anyway, the implementation of such a callback is almost independent
from the rest of alsa-lib code.  It would simply invoke inotify with a
set of config file names.  So, even an API returning a set of config
file names should suffice in theory...


Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux