From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: pcm_drain() behavior (Re: snd_pcm_close hangs) Date: Mon, 24 Jun 2002 15:39:53 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: alsa-devel@lists.sourceforge.net Cc: Tim Goetze List-Id: alsa-devel@alsa-project.org At Tue, 18 Jun 2002 20:23:50 +0200 (CEST), Tim Goetze wrote: > > Takashi Iwai wrote: > > >well, draing samples at close corresponds to flushing the buffered > >data to disk at fclose. then it sounds normal, doesn't it? > > i'm still not convinced -- if the stream is running when you close it, > you're right, obviously. > > but when it's not running, starting and stopping it usually produces a > click that will ruin the audible effect of the few msec worth of sound > 'drained' (that nobody cares about anyway since the stream is about to > be closed). > > right? this is a question of behavior. i don't think it's absolutely "wrong" that the driver processes the rest of samples at stop status if drain() is called. but.. from my feeling, i agree with you. it doesn't matter if the samples are simply dropped at close() when its stream was already stopped. so i myself would like to change this behavior. the fix must be quite easy. however, we need a consensus about this. any comments (or objections)? Takashi ------------------------------------------------------- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/