| Miles Sound System SDK 7.2a |
The structure RAD_IOP_SOUND_DATA is a structure used to control a sound interrupt callback.
struct RAD_IOP_SOUND_DATA { U32 which_sound_core; RAD_IOP_SOUNDCALLBACK callback; S32 overwrite; VOID_PTR address; U32 length; RAD_IOP_STATUS_VALUES status; }; |
This structure contains the data to call a sound interrupt callback. It must remain valid until the sound callback is unregistered.
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 overwrite flag is not meaningful in RAD_IOP_SPDIF mode.
Group:
The RAD_IOP API for the Sony PS2
Related Functions:
RAD_IOPPauseSound, RAD_IOPRegisterSoundCallback, RAD_IOPStartSound, RAD_IOPStartUp, RAD_IOPUnregisterSoundCallback, RAD_IOP_SOUNDCALLBACK
Related Basic Types:
RAD_IOP_STATUS_VALUES, S32, U32, VOID_PTR
Related Structures:
RAD_IOP_SOUND_DATA
For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.