Re: [linux-audio-dev] OSS, Sound playback too fast

From: Cedric Roux <Cedric.Roux@email-addr-hidden>
Date: Mon Mar 13 2006 - 17:05:40 EET

On Mon, 13 Mar 2006, Tobias Scharnberg wrote:

> In my main loop I use SNDCTL_DSP_GETOSPACE to poll the buffer.
> Whenever it shows free fragments, I write more data to the card. What
> I experience is that playback is too fast. I can make it slower by
> reducing the buffer-size or by setting a very high usleep value so
> that all
> fragments practically stay free.

Did you think about using select to check for free space in your
device instead of this GETOSPACE method?

The polling is not a good way to do it, I think.

Maybe you also have the card in non-blocking mode (or the opposite).
If you change that, myabe also...

Try to avoid the polling method, IMHO.

Take care,
Cedric.
Received on Mon Mar 13 20:15:05 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 13 2006 - 20:15:05 EET