CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Basic playback mechanism

Working with a player handle

Attention
For Unity, each CRI Atom Source component requires one player handle (CriAtomExPlayer).
An application uses a player handle to play and update a sound easily.
Assign the name of a sound file or a "Cue" to the player handle and execute the playback start function. Then the sound playback starts.
Here, the player handle obtains "Voices" from the Voice Pool and play them back.

adx2u_keys_ADX_A_01.png

After the playback is finished, the voices are automatically released and returned to the voice pool.
The following graph shows the state diagram of the player handle during the playback process.

adx2u_keys_ADX_A_34.png

Playing multiple sounds with one player handle

If another playback start function is executed on the player handle during sound playback, a new voice is obtained from the voice pool. The new sound instance is played while the current one is still being played.
You can also play different sounds simultaneously with a single player handle.

adx2u_keys_ADX_A_15.png
If you change a playback parameter (e.g. volume) on a player handle during playback, this change will affect all the voices owned by the player handle.

adx2u_keys_ADX_A_02.png

Dynamic voice assignment

If no voice is available in the voice pool when a player handle tries to obtain a voice, the lowest priority voice is stopped and assigned to the player handle.
This function is called "dynamic voice assignment" .

adx2u_keys_ADX_A_17.png

Sequence playback

A player handle uses a sequencer which can obtain and play back voices sequentially.
When a cue designed as a "sequence" is set and played, the sequencer of the player handle plays each sound sequentially at the specified time on the timeline.
The sequencer acquires and plays a voice at the specified time and automatically releases it when its playback is finished.

adx2u_keys_ADX_A_16.png

The playback speed of the sequencer can be adjusted in order to play sounds slower or faster.
It is also easy to pause or resume the sound played by a cue.

Playing a sound from an arbitrary position

Playback from an arbitrary position (seek playback) is also supported.
The start position must be specified in milliseconds.
Playback can also be controlled with the play gate function of "AISAC" .