From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hynek Hanke Subject: Re: Crack sounds in playback Date: Fri, 5 Aug 2005 14:29:40 +0200 Message-ID: <20050805122940.GC11890@brailcom.cz> References: <20050805110553.GB32027@brailcom.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Return-path: Received: from smtp-out4.iol.cz (smtp-out4.iol.cz [194.228.2.92]) by alsa.jcu.cz (ALSA's E-mail Delivery System) with ESMTP id A9A74216 for ; Fri, 5 Aug 2005 14:33:06 +0200 (MEST) Content-Disposition: inline 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: Clemens Ladisch Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Fri, Aug 05, 2005 at 02:20:25PM +0200, Clemens Ladisch wrote: > Hynek Hanke wrote: > > after all the suggestions (thanks for them), I got the alsa playback working > > with the non-blocking/polling approach. I'm checking for xrun and suspend > > states in the poll loop and after I send all the samples, I set avail_min to > > the whole buffer and poll() until the states gets to XRUN. > Underruns will interrupt the playback. You should set avail_min to > the period size so that you can fill up the buffer before playback > gets stopped. I'm sorry, maybe I didn't explain myself clearly. I set avail_min to this state and expect to get XRUN only *after* I've sent all the samples to the buffer. So only at the very end, I get an XRUN and thus I know the playback terminated. >>From the logs, I'm sure there are no XRUNs reported *during* the playback. With Regards, Hynek Hanke ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf