Miles Sound System SDK 7.2a

RAD_IOPFindNonPlayingVoiceMask

The function RAD_IOPFindNonPlayingVoiceMask returns a bitmask that corresponds to a single non-playing voice.

S32 RAD_IOPFindNonPlayingVoiceMask(
  U32 mask
);

In Parameters

mask
Specifies a mask of playing and non-playing voices (usually returned from the RAD_IOPQueueAsyncSPUGlobalState).

Returns

Returns a bitmask of one of the non-playing voices in the input mask.

Discussion

This function is just a simple utility function.

Given a voice playing mask (where '1' bits correspond to playing voices and '0' bits indicate non-playing ones), this function will quickly return a mask indicating the first voice that isn't playing. For example, if all voices except for voice 2 were playing, then the input mask would be 0xfffffb, and this function would return 4 (i.e., 1 << 2).


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

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