Miles Sound System SDK 7.2a

RAD_IOPSetSPUVoiceOnOff

The function RAD_IOPSetSPUVoiceOnOff starts or stops the playback of one or more SPU voices.

S32 RAD_IOPSetSPUVoiceOnOff(
  U32 core0_voice_mask,
  U32 core1_voice_mask,
  S32 onoff
);

In Parameters

core0_voice_mask
Specifies the bit mask of the voices on core 0 to start or stop.
core1_voice_mask
Specifies the bit mask of the voices on core 1 to start or stop.
onoff
Use 1 to start the specified voices, or 0 to stop the specified voices.

Returns

Returns non-zero on success, or zero on failure.

Discussion

This function tells the SPU to begin or stop playback of one or more SPU voices.

In practice, you can just think of this function starting and stopping the voice, but that's not exactly what happens at the hardware level.

In fact, it's kind of weird to say a voice is "started" or "stopped" in the SPU hardware at all, because the voices are always decoding data. It's more accurate to stay that when you start a sound, you are telling the hardware to jump to the starting address set with RAD_IOPSetSPUVoiceStartAddress and to begin the volume envelope specified by RAD_IOPSetSPUVoiceADSR. When you stop a sound, you are really just telling the hardware to begin the release portion of the envelope (which generally just cranks the audio volume down to zero, so that it seems like playback has stopped).


Group: The RAD_IOP SPU Hardware Voice API for the Sony PS2
Related Functions: RAD_IOPSetSPUVoiceADSR, RAD_IOPSetSPUVoiceStartAddress
Related Basic Types: S32, U32

For technical support, e-mail Miles3@radgametools.com
© Copyright 1991-2007 RAD Game Tools, Inc. All Rights Reserved.