nn::snd::CTR::AllocVoice FunctionVoice * AllocVoice( s32 priority, VoiceDropCallbackFunc callback, uptr userArg );
| Name | Description | |
|---|---|---|
| in | priority | Priority. |
| in | callback | Address of the callback function. |
| in | userArg | User argument. |
Voice object on success. Returns NULL on failure. Gets a voice.
Call this function to get a valid Voice object. This function returns the address of one usable object of the 24 voice objects managed by the library. If the maximum number of voice objects (24) have already been obtained, behavior depends on the priority specified as an argument.
| Normal priority | If the priority specified as an argument is greater than or equal to the lowest priority in the obtained objects, the lowest-priority voice is stopped and the object's address is returned. The callback function specified by callback is invoked for the voice that is stopped. |
|---|---|
VOICE_PRIORITY_NODROP |
If the lowest priority object among the obtained objects is VOICE_PRIORITY_NODROP, NULL is returned. If the lowest priority is lower than VOICE_PRIORITY_NODROP, this function behaves as if you specified a normal priority.
|
CONFIDENTIAL