CRI ADX  Last Updated: 2024-07-17 10:47 p
Playing Back Multiple ACBs

Samples Directory

/CRIWARE/SDK/pc/samples/criatomex/playback_multi_acb


Sample Description

Although most of the sample included in this SDK uses basically only one ACB file, you can also use multiple ACB files at the same time.

Following code is an example of loading two ACB files and playing back Cue for each ACB file.

CriAtomExAcbHn acb_hn[2];
/* Load an ACB file and create an ACB handle */
acb_hn[0] = criAtomExAcb_LoadAcbFile(NULL, PATH ACB_FILE, NULL, PATH AWB_FILE, NULL, 0);
acb_hn[1] = criAtomExAcb_LoadAcbFile(NULL, PATH ACB2_FILE, NULL, NULL, NULL, 0);
player[0] = criAtomExPlayer_Create(NULL, NULL, 0);
player[1] = criAtomExPlayer_Create(NULL, NULL, 0);
/* Set Cue ID */
criAtomExPlayer_SetCueId(player[0], acb_hn[0], CRI_ATOMCUESHEET_BOMB2);
criAtomExPlayer_SetCueId(player[1], acb_hn[1], CRI_ATOMCUESHEET2_SIN32K1SHOT);
/* Start playback */
CriAtomExAcbObj * CriAtomExAcbHn
ACB handle.
Definition: cri_le_atom_ex.h:3033
CriAtomExAcbHn criAtomExAcb_LoadAcbFile(CriFsBinderHn acb_binder, const CriChar8 *acb_path, CriFsBinderHn awb_binder, const CriChar8 *awb_path, void *work, CriSint32 work_size)
Load an ACB file.
CriAtomExPlaybackId criAtomExPlayer_Start(CriAtomExPlayerHn player)
Start the playback.
CriAtomExPlayerObj * CriAtomExPlayerHn
Player handle.
Definition: cri_le_atom_ex.h:3622
CriAtomExPlayerHn criAtomExPlayer_Create(const CriAtomExPlayerConfig *config, void *work, CriSint32 work_size)
Create an AtomEx player.
void criAtomExPlayer_SetCueId(CriAtomExPlayerHn player, CriAtomExAcbHn acb_hn, CriAtomExCueId id)
Set the sound data to play (specifying a Cue ID)


ACB header is generated for each ACB file, so you must be careful of the correspondence between headers and ACB files when playing back using Cue IDs.