From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: why do elements disappear? Date: Wed, 16 Feb 2005 13:12:41 +0100 Message-ID: References: <1108501973.2845.87.camel@tux.lan> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII In-Reply-To: Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Thierry Vignaud Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Wed, 16 Feb 2005 13:14:04 +0100, Thierry Vignaud wrote: > > Takashi Iwai writes: > > > > > > a mixer app of mine (you know, one of those controlling > > > > > volumes) is updating itself (if other apps change settings) by > > > > > continuously running get-volume (et al) on all mixer elements > > > > > every once in a while (10Hz). > > > > > > > > Well, this isn't a good idea. You should do update passively via > > > > poll(). The exception is a control with VOLATILE flag like VU > > > > meter, which won't send change notification. But normal controls > > > > send notification if the value is changed, or the control is > > > > created/deleted, so that the app can react. > > > > > > is this the same bug that affects totem? > > > > > > see totem's gdb trace at > > > http://qa.mandrakesoft.com/show_bug.cgi?id=13045 and xine strace at > > > http://qa.mandrakesoft.com/show_bug.cgi?id=13449 > > > (http://qa.mandrakesoft.com/attachment.cgi?id=2444) > > > > They are slightly different problems. I guess it's indeed a bug of > > alsa-lib, which was fixed recently on CVS. > > could you point to the relevant fix? > alsa-lib/src/mixer/mixer.c: revision 1.70 date: 2005/02/04 19:18:49; author: tiwai; state: Exp; lines: +2 -2 Summary: Use bag_for_each_safe() for event handling loop Use bag_for_each_safe() for event handling loop. Event callbacks may be destructive. Takashi ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click