CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
Bounce audio in Unity Editor.
The CriWare.Editor.CriAtomWaveFile class can output(bounce) the sound played by ADX to a wav file. This can be used for example to:
  • Draw the signal on a customized editor extension
  • Temporarily use audio compressed with the ADX codec in its uncompressed form

Behavior Overview

The sound played by the CriWare.CriAtomExPlayer will be rendered by the ASR(Atom Sound Renderer) and output by the hardware following the procedure shown below:
atom_process_flow.png
Using the CriWare.Editor.CriAtomWaveFile class, the audio mixed by ASR
(in the final part of the procedure depicted) can be exported to a wav file.
Since the output corresponds to the result of the ASR mixing, it will reflect the following events:
  • parameter changes in a CriAtomExPlayer
  • audio playback resulting from multiple CriAtomExPlayers
  • DSP bus settings being switched during audio playback using the snapshot function, etc.

Attention
. Bouncing cannot be performed faster than real-time.
This is because the sound output of the Atom library is recorded in real-time.
. Only the output of the default ASR rack - created by the CRIWARE Unity plugin itself - can be bounced.
ASR racks created by the user cannot be bounced.

Usage Instructions

Bouncing can be executed after
the library has been initialized by calling CRIWARE Library Initializer component and CriWareInitializer::Initialize
or CriWare.Editor.CriAtomEditorUtilities.InitializeLibrary() .
Although the playback starts after the bouncing in the following sample,
there is no restriction concerning the order in which these two operations are started.
string outputFilePath; //Path of the bounced file
uint numChannels; //Number of channels in the bounced file
CriWare.Editor.CriAtomWaveFile.StartBounce(outputFilePath, numChannels);
~~
player.Play(acb, cueName);
// Get the current bouncing time for progress bars, etc.
~~
// Stop the bounce and flush the file.
CriAtomPlugin.FinalizeLibrary();
Attention
There is a limit to the number of channels that can be bounced with CriWare.Editor.CriAtomWaveFile.StartBounce() .
Please check the notes in the reference to learn more about the number of channels that can be specified.