Miles Sound System SDK 7.2a

RAD_IOP_SPU_VOICE_STATE

The structure RAD_IOP_SPU_VOICE_STATE is a structure used with the RAD_IOPQueueAsyncSPUVoiceState function.

struct RAD_IOP_SPU_VOICE_STATE
{
  U32 core;
  U32 voice;
  RAD_IOP_SPU_VOICE_STATE_CALLBACK callback;
  RAD_IOP_STATUS_VALUES status;
  S32 current_playing;
  U32 current_address;
  U32 current_left_volume;
  U32 current_right_volume;
  U32 current_envelope;
};

In Members

core
Specifies the core to query - either 0 or 1.
voice
Specifies the voice to query - from 0 to 24. Note that this isn't a voice mask, but a voice index, since you only query one voice at a time.
callback
Specifies a callback that should be made upon completion. If you don't want to be called back, then set this field to zero.

Out Members

status
Contains the current status of the async status.
current_playing
1 if playing, 0 if not playing (i.e., the voice envelope hasn't entered its release phase yet).
current_address
Returns the current address of the voice playback.
current_left_volume
Returns the left volume value, which is the left volume modulated by the current envelope value.
current_right_volume
Returns the right volume value, which is the right volume modulated by the current envelope value.
current_envelope
Returns the current envelope value.

Discussion

This structure serves as both the input and the output of the RAD_IOPQueueAsyncSPUVoiceState function. You supply the 'in' parameters, and RAD_IOP returns the 'out' parameters.

If you don't have a callback set, then you can spin on the status field and wait for it to go greater than or equal to RAD_IOP_STATUS_COMPLETE. You then query the status for RAD_IOP_STATUS_DONE to determine if the query succeeded.


Group: The RAD_IOP SPU Hardware Voice API for the Sony PS2
Related Functions: RAD_IOPQueueAsyncSPUVoiceState, RAD_IOP_SPU_VOICE_STATE_CALLBACK
Related Basic Types: RAD_IOP_STATUS_VALUES, S32, U32

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