Miles Sound System SDK 7.2a

RAD_IOP_SPU_GLOBAL_STATE

The structure RAD_IOP_SPU_GLOBAL_STATE is a structure used with the RAD_IOPQueueAsyncSPUGlobalState function.

struct RAD_IOP_SPU_GLOBAL_STATE
{
  RAD_IOP_SPU_GLOBAL_STATE_CALLBACK callback;
  RAD_IOP_STATUS_VALUES status;
  S32 current_playing_mask[ 2 ];
  U32 current_playing_count[ 2 ];
  U32 current_dry_left_mask[ 2 ];
  U32 current_wet_right_mask[ 2 ];
  U32 current_wet_left_mask[ 2 ];
  U32 current_wet_right_mask[ 2 ];
  U32 current_end_hit_mask[ 2 ];
};

In Members

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_mask[ 2 ]
Returns the current playing/not-playing mask for core 0 in the first U32, and core 1 in the second U32.
current_playing_count[ 2 ]
Returns the current count of playing voices on core 0 in the first U32 and core 1 in the second U32.
current_dry_left_mask[ 2 ]
Returns the current on/off dry left channel mask for core 0 in the first U32, and core 1 in the second U32.
current_wet_right_mask[ 2 ]
Returns the current on/off dry right channel mask for core 0 in the first U32, and core 1 in the second U32.
current_wet_left_mask[ 2 ]
Returns the current on/off wet left channel mask for core 0 in the first U32, and core 1 in the second U32.
current_wet_right_mask[ 2 ]
Returns the on current on/off wet right channel mask for core 0 in the first U32, and core 1 in the second U32.
current_end_hit_mask[ 2 ]
Returns the low-level ENDX register mask.

Discussion

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

The current_playing_mask fields are bit masks, and the current_playing_count is simply a count of them. So, if voices 5 and 7 were playing on core 0, then current_playing_mask[ 0 ] would be "( 1 << 5 ) | ( 1 << 7 )", and current_playing_count[ 0 ] would be "2".

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_IOPQueueAsyncSPUGlobalState, RAD_IOP_SPU_GLOBAL_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.