Description
This method sends a previously allocated AudioBuffer object for playback. The caller is responsible for filling the AudioBuffer object with valid sample data before calling this method. Note that the caller is also responsible for handling sample rate conversion issues. When a buffer is sent for playback, it must match the sample rate being used for the audio output device. If sample rate conversion is required, the caller must perform this sample rate conversion. This is best achieved by using the ConvertSampleRate function to adjust the sample rate of the raw sample data.
Note that audio buffers should be sent for playback in the order they are created. If two AudioBuffer objects are allocated by successive calls to the CreateAudioBuffer method, and the second buffer is sent for playback through a call to the PlayBuffer method, that buffer will not begin playback until the first buffer is either sent for playback too, or deleted through a call to the DeleteAudioBuffer method.
Usage
void PlayBuffer(AudioBuffer* buffer);
Argument list
- buffer [AudioBuffer*]
- The AudioBuffer object to send for playback