CRI ADX  Last Updated: 2024-07-17 10:47 p
Control by Category

Samples Directory

/CRIWARE/SDK/pc/samples/criatomex/category

Sample Description

Before controlling playback by category , you must set category to each Cue in CRI Atom Craft.

Use CriAtomExCategory API to control playback by category.

Controlling by category applies to all sounds belonging to the category regardless of in which players the sounds were played.

The following is a code to control by category.

/* Specify Cue ID (SE) */
criAtomExPlayer_SetCueId(player, acb_hn, CRI_ATOMCUESHEET_HELI_LOOP);
/* Start playback */
/* Specify Cue ID (Music) */
criAtomExPlayer_SetCueId(player, acb_hn, CRI_ATOMCUESHEET_MUSICXFADE);
/* Start playback */
/* Specify Cue ID (Voice) */
criAtomExPlayer_SetCueId(player, acb_hn, CRI_ATOMCUESHEET_MALE);
/* Start playback */
:
/* Play back the Music category solo (make volume for sounds being played back in other categories to 0.0f) */
criAtomExCategory_SoloByName("Music", CRI_TRUE, 0.0f);
void criAtomExCategory_SoloByName(const CriChar8 *name, CriBool solo, CriFloat32 mute_volume)
Solo / unsolo a category specified by its name.
CriAtomExPlaybackId criAtomExPlayer_Start(CriAtomExPlayerHn player)
Start the playback.
void criAtomExPlayer_SetCueId(CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, CriAtomExCueId id)
Set the sound data to play (specifying a Cue ID)