CRIWARE Unity Plugin Manual  Last Updated: 2024-07-12
CriAtom Class Reference

A component for controlling the overall sound playback. More...

Inherits CriMonoBehaviour.

Public Types

enum  SpeakerMapping : System.Int32 {
  Auto = 0, Monaural, Stereo, Ch5_1,
  Ch7_1, Ch5_1_2, Ch7_1_2, Ch7_1_4,
  Ambisonics1p, Ambisonics2p, Ambisonics3p, Object,
  Custom
}
 Mixer speaker mapping type More...
 

Static Public Member Functions

static void AttachDspBusSetting (string settingName)
 Attaching the DSP bus settings More...
 
static void DetachDspBusSetting ()
 Detaches the DSP bus settings More...
 
static CriAtomCueSheet GetCueSheet (string name)
 Gets a Cue Sheet More...
 
static CriAtomCueSheet AddCueSheet (string name, string acbFile, string awbFile, CriFsBinder binder=null)
 Adds a Cue Sheet More...
 
static CriAtomCueSheet AddCueSheetAsync (string name, string acbFile, string awbFile, CriFsBinder binder=null, bool loadAwbOnMemory=false)
 Adds a Cue Sheet asynchronously More...
 
static CriAtomCueSheet AddCueSheet (string name, byte[] acbData, string awbFile, CriFsBinder awbBinder=null)
 Adds a Cue Sheet (reading from memory) More...
 
static CriAtomCueSheet AddCueSheetAsync (string name, byte[] acbData, string awbFile, CriFsBinder awbBinder=null, bool loadAwbOnMemory=false)
 Adds a Cue Sheet asynchronously (reading from memory) More...
 
static void RemoveCueSheet (string name)
 Removes a Cue Sheet More...
 
static CriAtomExAcb GetAcb (string cueSheetName)
 Gets the ACB object More...
 
static void SetCategoryVolume (string name, float volume)
 Sets the Category volume by specifying the Category name. More...
 
static void SetCategoryVolume (int id, float volume)
 Sets the Category volume by specifying the Category ID. More...
 
static float GetCategoryVolume (string name)
 Gets the Category volume by specifying the Category name. More...
 
static float GetCategoryVolume (int id)
 Gets the Category volume by specifying the Category ID. More...
 
static void SetBusAnalyzer (string busName, bool sw)
 Enables the acquisition of the bus information More...
 
static void SetBusAnalyzer (bool sw)
 Enables acquisition of all bus information. More...
 
static CriAtomExAsr.BusAnalyzerInfo GetBusAnalyzerInfo (string busName)
 Gets the bus information. More...
 
static CriAtomExAsr.BusAnalyzerInfo GetBusAnalyzerInfo (int busId)
 

Properties

static bool CueSheetsAreLoading [get]
 Checks the completion of loading a Cue Sheet. More...
 

Detailed Description

A component for controlling the overall sound playback.

Description:
You need to prepare one for each scene.
If you create a CriAtomSource using the CRI Atom window on UnityEditor, it will automatically be created as an object with the name "CRIWARE". Normally, you do not need to create it.

Member Enumeration Documentation

enum SpeakerMapping : System.Int32
strong

Mixer speaker mapping type

Description:
Specify the ASR speaker mapping.
See also
CriAtomExAsrRack.Config.speakerMapping, CriAtomConfig.speakerMapping
Enumerator
Auto 

auto-configuration

Monaural 

1ch

Stereo 

2ch

Ch5_1 

5.1ch

Ch7_1 

7.1ch

Ch5_1_2 

5.1.2ch

Ch7_1_2 

7.1.2ch

Ch7_1_4 

7.1.4ch

Ambisonics1p 

1st order Ambisonics

Ambisonics2p 

2st order Ambisonics

Ambisonics3p 

3st order Ambisonics

Object 

Object Base Audio

Custom 

Custom Speaker Mapping

Member Function Documentation

static void AttachDspBusSetting ( string  settingName)
inlinestatic

Attaching the DSP bus settings

Parameters
settingNameName of the DSP bus setting
Description:
Builds a DSP bus from the DSP bus settings and attaches it to the sound renderer.
If you want to switch the DSP bus settings currently set, detach the bus and then reattach it.
Note:
This function is a return-on-complete function.
Calling this function blocks the server processing of the Atom library for a while.
If this function is called during sound playback, problems such as sound interruption may occur, so call this function at a timing when load fluctuations is accepted such as when switching scenes.
See also
CriAtom::DetachDspBusSetting
static void DetachDspBusSetting ( )
inlinestatic

Detaches the DSP bus settings

Description:
Detaches the DSP bus settings.

Note:
This function is a return-on-complete function.
Calling this function blocks the server processing of the Atom library for a while.
If this function is called during sound playback, problems such as sound interruption may occur, so call this function at a timing when load fluctuations is accepted such as when switching scenes.
See also
CriAtom::DetachDspBusSetting
static CriAtomCueSheet GetCueSheet ( string  name)
inlinestatic

Gets a Cue Sheet

Parameters
nameCue Sheet name
Returns
Cue Sheet object
Description:
Gets the registered Cue Sheet object based on the Cue Sheet name specified in the argument.
static CriAtomCueSheet AddCueSheet ( string  name,
string  acbFile,
string  awbFile,
CriFsBinder  binder = null 
)
inlinestatic

Adds a Cue Sheet

Parameters
nameCue Sheet name
acbFileACB file path
awbFileAWB file path
binderBinder object (optional)
Returns
Cue Sheet object
Description:
A Cue Sheet is added based on the file path information specified in the argument.
It is possible to register multiple Cue Sheets at the same time.

If a relative path is specified for each file path, the file is loaded relative to the StreamingAssets folder.
The file is loaded using the specified path if an absolute path or URL is specified.

When adding a Cue Sheet from the ACB and AWB files packed in the CPK file, specify the binder which bound the CPK in the binder argument.
The binder function cannot be used in ADXLE.
static CriAtomCueSheet AddCueSheetAsync ( string  name,
string  acbFile,
string  awbFile,
CriFsBinder  binder = null,
bool  loadAwbOnMemory = false 
)
inlinestatic

Adds a Cue Sheet asynchronously

Parameters
nameCue Sheet name
acbFileACB file path
awbFileAWB file path
binderBinder object (optional)
loadAwbOnMemoryWhether to load the AWB file on the memory (optional)
Returns
Cue Sheet object
Description:
A Cue Sheet is added asynchronously based on the file path information specified in the argument.
It is possible to register multiple Cue Sheets at the same time.

If a relative path is specified for each file path, the file is loaded relative to the StreamingAssets folder.
The file is loaded using the specified path if an absolute path or URL is specified.

When adding a Cue Sheet from the ACB and AWB files packed in the CPK file, specify the binder which bound the CPK in the binder argument.
The binder function cannot be used in ADXLE.

Loading is in progress while the CriAtomCueSheet::isLoading member of the returned Cue Sheet object is true.
Be sure to check that it returns false before playing the Cue.

If loadAwbOnMemory is set to false, only the header part of the AWB file is loaded on the memory and stream playback is performed.
If loadAwbOnMemory is set to true, the entire AWB file is loaded into memory, effectively resulting in memory playback.
In WebGL(Editor running), loadAwbOnMemory is forced to true for internal reasons.
static CriAtomCueSheet AddCueSheet ( string  name,
byte[]  acbData,
string  awbFile,
CriFsBinder  awbBinder = null 
)
inlinestatic

Adds a Cue Sheet (reading from memory)

Parameters
nameCue Sheet name
acbDataACB data
awbFileAWB file path
awbBinderBinder object for AWB (optional)
Returns
Cue Sheet object
Description:
Adds a Cue Sheet from the data and file path information specified in the arguments.
It is possible to register multiple Cue Sheets at the same time.

If a relative path is specified for the file path, the file is loaded relative to the StreamingAssets folder.
The file is loaded using the specified path if an absolute path or URL is specified.

When adding a Cue Sheet from the AWB file packed in the CPK file, specify the binder which bound the CPK in the awbBinder argument.
The binder function cannot be used in ADXLE.
static CriAtomCueSheet AddCueSheetAsync ( string  name,
byte[]  acbData,
string  awbFile,
CriFsBinder  awbBinder = null,
bool  loadAwbOnMemory = false 
)
inlinestatic

Adds a Cue Sheet asynchronously (reading from memory)

Parameters
nameCue Sheet name
acbDataACB data
awbFileAWB file path
awbBinderBinder object for AWB (optional)
loadAwbOnMemoryWhether to load the AWB file on the memory (optional)
Returns
Cue Sheet object
Description:
Adds a Cue Sheet from the data and file path information specified in the arguments.
It is possible to register multiple Cue Sheets at the same time.

If a relative path is specified for the file path, the file is loaded relative to the StreamingAssets folder.
The file is loaded using the specified path if an absolute path or URL is specified.

When adding a Cue Sheet from the AWB file packed in the CPK file, specify the binder which bound the CPK in the awbBinder argument.
The binder function cannot be used in ADXLE.

Loading is in progress while the CriAtomCueSheet::isLoading member of the returned Cue Sheet object is true.
Be sure to check that it returns false before playing the Cue.

If loadAwbOnMemory is set to false, only the header part of the AWB file is loaded on the memory and stream playback is performed.
If loadAwbOnMemory is set to true, the entire AWB file is loaded into memory, effectively resulting in memory playback.
In WebGL(Editor running), loadAwbOnMemory is forced to true for internal reasons.
static void RemoveCueSheet ( string  name)
inlinestatic

Removes a Cue Sheet

Parameters
nameCue Sheet name
Description:
Removes the added Cue Sheet.
static CriAtomExAcb GetAcb ( string  cueSheetName)
inlinestatic

Gets the ACB object

Parameters
cueSheetNameCue Sheet name
Returns
ACB object
Description:
Gets the ACB object corresponding to the specified Cue Sheet.
static void SetCategoryVolume ( string  name,
float  volume 
)
inlinestatic

Sets the Category volume by specifying the Category name.

Parameters
nameCategory name
volumeVolume
static void SetCategoryVolume ( int  id,
float  volume 
)
inlinestatic

Sets the Category volume by specifying the Category ID.

Parameters
idCategory ID
volumeVolume
static float GetCategoryVolume ( string  name)
inlinestatic

Gets the Category volume by specifying the Category name.

Parameters
nameCategory name
Returns
Volume
static float GetCategoryVolume ( int  id)
inlinestatic

Gets the Category volume by specifying the Category ID.

Parameters
idCategory ID
Returns
Volume
static void SetBusAnalyzer ( string  busName,
bool  sw 
)
inlinestatic

Enables the acquisition of the bus information

Parameters
busNameDSP bus name
swTrue: Enable acquisition. False: Disable acquisition.
static void SetBusAnalyzer ( bool  sw)
inlinestatic

Enables acquisition of all bus information.

Parameters
swTrue: Enable acquisition. False: Disable acquisition.
static CriAtomExAsr.BusAnalyzerInfo GetBusAnalyzerInfo ( string  busName)
inlinestatic

Gets the bus information.

Parameters
busNameDSP bus name
Returns
DSP bus information
static CriAtomExAsr.BusAnalyzerInfo GetBusAnalyzerInfo ( int  busId)
inlinestatic
Deprecated:
This is a deprecated API that will be removed. Please consider using CriAtom.GetBusAnalyzerInfo(string busName) instead.

Property Documentation

bool CueSheetsAreLoading
staticget

Checks the completion of loading a Cue Sheet.

Description:
Checks the completion of loading all Cue Sheets.

The documentation for this class was generated from the following file: