Audio Playback Problem

?
?
Hi,
I am new to SDL this lib… I am working on a project where i have decided to use this lib for audio and video playback. I am able to play the audio but the problem is that after every 3-4 sec’s there is the jerk in audio its like audio is jumping and there is a packet loss.
I am passing a buffer of 2304000 bytes at a time and once it is played then i fill it again. This i am doing in single thread.
Can any one help me out like what can be the exact problem that i am facing.

Warm Regards

Dwarkaprasad Dayama

Embedded Application Engineer

Ensoft Informatics Pvt. Ltd.
2 Serenity Ram Nagar, Bavdhan,
Pune 411021, INDIA
Tel. +91-20-22953296/+91-20-30900389
Mobile. +91-9890277545
www.ensoftinfo.com

You need to prepare your audio data in advance and queue it for playback in
advance, otherwise the audio output device will have nothing to play while
you are fetching more data. I am not sure how to do this in SDL_mixer, but
if you are using plain SDL_audio, it calls your function to fill the next
audio framebuffer in advance.

Alex.________________________________

From: Dwarka
Sent: Monday, August 29, 2005 1:57 AM
To: sdl at libsdl.org
Subject: [SDL] Audio Playback Problem

Hi,
I am new to SDL this lib… I am working on a project where i have decided
to use this lib for audio and video playback. I am able to play the audio
but the problem is that after every 3-4 sec’s there is the jerk in audio its
like audio is jumping and there is a packet loss.
I am passing a buffer of 2304000 bytes at a time and once it is played then
i fill it again. This i am doing in single thread.
Can any one help me out like what can be the exact problem that i am facing.

Warm Regards

Dwarkaprasad Dayama

Embedded Application Engineer

Ensoft Informatics Pvt. Ltd.
2 Serenity Ram Nagar, Bavdhan,
Pune 411021, INDIA
Tel. +91-20-22953296/+91-20-30900389
Mobile. +91-9890277545
www.ensoftinfo.com