The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.
SDL
Simple Directmedia Layer Forums
Play the buffer
Carabut Nicolae
Guest
Posted: Mon Jan 23, 2006 4:12 am
Hello,
my name is Carabut Nicolae.
I've recently started with the SDL. While digging into the docs and code
samples, I've came to the idea that there is a lack of clean documentation.
So here is my question:
I have a music file (ogg, mp3 ... whatever), I have kind of code which
in a loop is decoding the format througth a corresponding library, and
at some point I have buffer with data in decoded format which normally
should be plaied on the audio device.
This is how I see the logic it should be
/**************** logic of a chunk of code (AAA)**************/
SDL_OpenAudio();
loop
{
decode( input_buffer, output_buffer );
play_to_device( output_buffer ); // how to implement this one ??
}