From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Exiting from snd_pcm_wait or snd_pcm_write. Date: Tue, 08 Apr 2003 18:04:31 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <3E908D22.5070603@superbug.demon.co.uk> Mime-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <3E908D22.5070603@superbug.demon.co.uk> Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: James Courtier-Dutton Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org At Sun, 06 Apr 2003 21:25:06 +0100, James Courtier-Dutton wrote: > > Hi all, > > If I have an application running 2 or more threads. > Thread 1 is currently calling snd_pcm_wait() waiting for enough > availiable space to appear in the sound buffer. > Thread 2 wants to stop thread 1 doing that( abort the snd_pcm_wait() > call), and then wants thread 1 to restart with new data. > > Can Thread 2 just call snd_pcm_drop() while thread 1 is calling > snd_pcm_wait() ? it should be ok. the thread 1 will be woken up after the pcm is stopped, but POLLOUT won't be set in this case. > What about Thread 2 calling snd_pcm_reset() while thread 1 is calling > snd_pcm_wait()? this may not work (although i'm not 100% sure). the thread 1 might lose sync. ciao, Takashi ------------------------------------------------------- This SF.net email is sponsored by: ValueWeb: Dedicated Hosting for just $79/mo with 500 GB of bandwidth! No other company gives more support or power for your dedicated server http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/