From: Takashi Iwai Subject: Re: Switching sound cards on the fly Date: Fri, 16 Mar 2007 13:11:44 +0100 Message-ID: References: <75b66ecd0703151829t1513551dkc94b3d4025cee98a@mail.gmail.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <75b66ecd0703151829t1513551dkc94b3d4025cee98a@mail.gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Lee Revell Cc: markknecht@gmail.com, alsa-devel List-Id: alsa-devel@alsa-project.org 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