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

From: Tobias Scharnberg <elisa.zwei@email-addr-hidden>
Date: Mon Mar 13 2006 - 16:57:42 EET

Hello list,
before someone tells me to use ALSA - the AC97 codec on my Arm-Board
does not work wit ALSA according to the distributor... so it seems I
have to stick with OSS.

I opened a 16 bit 44100 wav-file with libsndfile and wrote the PCM to
a buffer. Then I configure the card with 16 bit NE, 44100 and with 5
fragments of the size of 2048 bytes. According to the readback values,
all data was set by OSS.

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.

There is a precompiled madplayer on the device and it plays
perfectly... can someone give me a hint what went wrong?

Thanks!
Tobias
Received on Mon Mar 13 20:15:04 2006

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