| Miles Sound System SDK 7.2a |
The function RAD_IOP_SOUNDCALLBACK points to a function that will be called periodically to fill a streaming sound buffer.
void RAD_IOP_SOUNDCALLBACK( RAD_IOP_SOUND_DATA const *sound_data ); |
This function will be called periodically to fill the sound buffer.
Each time your sound callback is made, you must overwrite or mix sound data into the buffer that is specified by the address and length fields in the sound_data structure. The overwrite flag in the sound_data structure says whether you should copy your data directly into the buffer (if overwrite is true), or whether you should mix your data into the buffer (if overwrite is false). To mix, just add your S16 values with the S16 values that are already in the buffer (clamping at -32768 and 32767).
Normally, the buffer is a 48,000 Hz, 16-bit, stereo PCM data block which is formatted in the Sony style of 256 left samples followed by 256 right samples. The length will always be a multiple of 512 samples (in the current version of RAD_IOP, it will be 2,048 bytes). When the RAD_IOP_SPDIF + RAD_IOP_NEED_CORE0 flags are used, the data block returned by the EE is treated as raw bitstream data, typically destined for a DTS receiver. (The callback's overwrite flag is not meaningful in RAD_IOP_SPDIF mode.)
Group:
The RAD_IOP API for the Sony PS2
Related Basic Types:
void
Related Structures:
RAD_IOP_SOUND_DATA
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.