CRI ADX  Last Updated: 2025-05-07 13:34 p
How to Play Back Multiple Voices
There are three ways to play multiple sounds.


Play multiple sounds together in one cue

CRI Atom Craft allows you to input multiple audio waveform data into one cue.
You can create data that plays in sequence on the timeline without overlapping.
You can also create multiple tracks and create data that plays multiple sounds simultaneously on the timeline.


For more information, please refer to Cue.


Advantages
- It can be played with the timing and balance intended by the designer.
- The program is very simple, and you just need to instruct playback for one cue.


Disadvantage
- If the playback does not go as intended, you will need to go back to the data creation stage and make adjustments.
(However, you can make adjustments while previewing with CRI Atom Craft, so there is little need to readjust after handing it over to the programmer.)


Making multiple playback requests to one player

You can make multiple playback requests with one AtomEx player.


Specifically, the code is as follows.


/* Create a player */
player = criAtomExPlayer_Create(NULL, NULL, 0);
/* Set a Cue ID and start playback */
criAtomExPlayer_SetCueId(player, acb_hn, CUEID_1);
/* Set a Cue ID and start playback */
criAtomExPlayer_SetCueId(player, acb_hn, CUEID_2);
/* Set a Cue ID and start playback */
criAtomExPlayer_SetCueId(player, acb_hn, CUEID_3);
CriAtomExPlaybackId criAtomExPlayer_Start(CriAtomExPlayerHn player)
Start the playback.
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)


For details, please refer to the sample program Playback by Cue ID .


Advantages
-You can freely change the playback timing and adjust parameters in the program.


Disadvantages
-Since there is only one player, you cannot control the playback of each sound.


Create multiple players and request playback from each one

Specifically, the code is as follows.


/* Playback by player 1 */
player_1 = criAtomExPlayer_Create(NULL, NULL, 0);
criAtomExPlayer_SetCueId(player_1, acb_hn, CUEID_1);
/* Playback by player 2 */
player_2 = criAtomExPlayer_Create(NULL, NULL, 0);
criAtomExPlayer_SetCueId(player_2, acb_hn, CUEID_2);
/* Playback by player 3 */
player_3 = criAtomExPlayer_Create(NULL, NULL, 0);
criAtomExPlayer_SetCueId(player_3, acb_hn, CUEID_3);


Advantages
-You can freely change the playback timing and adjust parameters in the program.
-You can control each sound during playback.


Disadvantages
-Since multiple players must be managed, the program becomes complicated.


Return:Tips