Sample Directory
/CRIWARE/SDK/pc/samples/criatomex/voice_event_callback
Sample Description
- A voice event callback is a callback event that is triggered in connection with a voice pool access (i.e. when obtaining or releasing a voice).
- By registering a voice event callback, you can check whether data requested for playback with an AtomEx player has been played correctly or not.
(For example, you can check at the application level if a voice was allocated and playback was performed, if playback failed due to insufficient voices, if playback of another sound was stopped due to voice limit processing and other details about how the request was processed.)
- You can use voice event callbacks as follows:
- Define a CriAtomExVoiceEventCbFunc type function in your application.
- Register the function you defined with the criAtomEx_SetVoiceEventCallback function.
- The following sample code demonstrates this procedure.
static void user_voice_event_func(
{
}
main()
{
:
:
}
enum CriAtomExVoiceEventTag CriAtomExVoiceEvent
Voice event.
void criAtomEx_SetVoiceEventCallback(CriAtomExVoiceEventCbFunc func, void *obj)
Register a voice event callback.
Detailed information about a voice.
Definition: cri_le_atom_ex.h:5190
- The procedure above will call the registered function any time the voice pool is accessed by the Atom library.
- The event that triggered the callback can be determined by the second parameter of the callback function (CriAtomExVoiceEvent).
Refer to CriAtomExVoiceEventTag in the reference for the exact meaning of each CriAtomExVoiceEvent value.<br