Miles Sound System SDK 7.2a

RAD_IOPSetSPUVoiceADSR

The function RAD_IOPSetSPUVoiceADSR sets the envelope for one or more SPU voices.

S32 RAD_IOPSetSPUVoiceADSR(
  U32 core0_voice_mask,
  U32 core1_voice_mask,
  U32 adsr1,
  U32 adsr2
);

In Parameters

core0_voice_mask
Specifies the bit mask of the voices on core 0 to set.
core1_voice_mask
Specifies the bit mask of the voices on core 1 to set.
adsr1
Specifies the first envelope bit pattern.
adsr2
Specifies the second envelope bit pattern.

Returns

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

Discussion

This function tells the SPU to set the volume envelope of one or more SPU voices.

The envelope bit patterns are fairly complicated and are basically a big set of table indexes encoded into two 32-bit words. If you want to set a voice envelope, you should refer to the Sony docs directly.

For a simple, instant-on, full sustain, and instant-fall-off envelope, use 0x000f for adsr1, and 0x1fc0 for adsr2.


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

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