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

ACB and AWB data More...

Inherits CriDisposable.

Public Member Functions

override void Dispose ()
 Unloads the ACB file More...
 
bool Exists (string cueName)
 Checks the existence of the Cue (Cue name specified) More...
 
bool Exists (int cueId)
 Checking the existence of the Cue (Cue ID specified) More...
 
bool GetCueInfo (string cueName, out CriAtomEx.CueInfo info)
 Gets Cue information (Cue name specified) More...
 
bool GetCueInfo (int cueId, out CriAtomEx.CueInfo info)
 Gets Cue information (Cue ID specified) More...
 
bool GetCueInfoByIndex (int index, out CriAtomEx.CueInfo info)
 Gets Cue information (Cue index specified) More...
 
CriAtomEx.CueInfo[] GetCueInfoList ()
 Gets all Cue information More...
 
bool GetWaveFormInfo (string cueName, out CriAtomEx.WaveformInfo info)
 Gets sound waveform information (Cue name specified) More...
 
bool GetWaveFormInfo (int cueId, out CriAtomEx.WaveformInfo info)
 Gets the sound waveform information (Cue ID specified) More...
 
int GetNumCuePlaying (string name)
 Gets the number of Voices of the Cue for which Cue limit is set (Cue name specified) More...
 
int GetNumCuePlaying (int id)
 Gets the number of Voices of the Cue for which Cue limit is set (Cue ID specified) More...
 
int GetBlockIndex (string cueName, string blockName)
 Gets the Block index (Cue name specified) More...
 
int GetBlockIndex (int cueId, string blockName)
 Gets Block index (Cue ID specified) More...
 
int GetNumUsableAisacControls (string cueName)
 Gets the number of AISAC Controls that can be controlled by a Cue (Cue name specified) More...
 
int GetNumUsableAisacControls (int cueId)
 Gets the number of AISAC Controls that can be controlled by a Cue (Cue ID specified) More...
 
bool GetUsableAisacControl (string cueName, int index, out CriAtomEx.AisacControlInfo info)
 Gets the AISAC Controls that can be controlled by a Cue (Cue name specified) More...
 
bool GetUsableAisacControl (int cueId, int index, out CriAtomEx.AisacControlInfo info)
 Gets the AISAC Controls that can be controlled by a Cue (Cue ID specified) More...
 
void ResetCueTypeState (string cueName)
 Resets the Cue type state (Cue name specified) More...
 
void ResetCueTypeState (int cueId)
 Resets the Cue type state (Cue ID specified) More...
 
void AttachAwbFile (CriFsBinder awb_binder, string awb_path, string awb_name)
 Attaches the AWB file for streaming More...
 
void DetachAwbFile (string awb_name)
 Detaches the AWB file for streaming More...
 
bool IsReadyToRelease ()
 Gets the immediate release state of the ACB handle More...
 

Static Public Member Functions

static CriAtomExAcb LoadAcbFile (CriFsBinder binder, string acbPath, string awbPath)
 Loads the ACB file More...
 
static CriAtomExAcb LoadAcbData (byte[] acbData, CriFsBinder awbBinder, string awbPath)
 Loads the ACB data More...
 
static CriAtomExAcb LoadAcbData (IntPtr acbData, int dataSize, CriFsBinder awbBinder, string awbPath)
 Loads the ACB data More...
 

Detailed Description

ACB and AWB data

Description:
A class that manages the Cue information.
Loads or unloads ACB or AWB, or gets the Cue information etc.

Member Function Documentation

static CriAtomExAcb LoadAcbFile ( CriFsBinder  binder,
string  acbPath,
string  awbPath 
)
inlinestatic

Loads the ACB file

Parameters
binderBinder object
acbPathPath of the ACB file
awbPathPath of the AWB file
Returns
CriAtomExAcb object
Description:
Loads the ACB file and import the information required for Cue playback.

Specify the path of the ACB file for on-memory playback in the second argument acbPath, and the path of the AWB file for stream playback in the third argument awbPath.
(When loading ACB data for on-memory playback only, the value set in awbPath is ignored.)

When the ACB file and the AWB file are packed in one CPK file, you need to specify the CriFsBinder object that binds the CPK file as the first argument ( binder ).

Loading the ACB file returns an CriAtomExAcb object ( CriWare.CriAtomExAcb ) for accessing the ACB data.
You can play the Cue in the ACB file by specifying the ACB handle and the Cue name to be played using the CriWare.CriAtomExPlayer::SetCue function for the AtomExPlayer.

This function will return null as a return value if the ACB file cannot be loaded due to a read error.
Note:
The library must be initialized before calling this function.

The ACB handle internally allocates a binder ( CriFsBinder ).
When loading an ACB file, it is necessary to initialize the library using the settings which allow binder for the number of ACB files can be allocated.

This function is a return-on-complete function.
The time it takes to load an ACB file varies depending on the platform.
If this function is called at a timing when the screen needs to be updated such as in a game loop, the process is blocked in the unit of milliseconds, resulting in dropped frames.
Load the ACB file at a timing when load fluctuations is accepted such as when switching scenes.
See also
CriAtomExPlayer::SetCue
static CriAtomExAcb LoadAcbData ( byte[]  acbData,
CriFsBinder  awbBinder,
string  awbPath 
)
inlinestatic

Loads the ACB data

Parameters
acbDataByte array of the ACB data
awbBinderBinder object for AWB
awbPathPath of the AWB file
Returns
CriAtomExAcb object
Description:
Loads the ACB data placed on the memory and captures the information required for Cue playback.

Specify the path of the AWB file for stream playback in the second argument awbPath.
(When loading ACB data for on-memory playback only, the value set in awbPath is ignored.)

When the AWB file is packed in a CPK file, you need to specify the CriFsBinder object that binds the CPK file as the second argument ( binder ).

Loading the ACB data returns an CriAtomExAcb object ( CriWare.CriAtomExAcb ) for accessing the ACB data.
You can play the Cue in the ACB file by specifying the ACB handle and the Cue name to be played using the CriWare.CriAtomExPlayer::SetCue function for the AtomExPlayer.

This function will return null as a return value if the ACB file cannot be loaded due to a read error.
Note:
The library must be initialized before calling this function.

The ACB handle internally allocates a binder ( CriFsBinder ).
When loading an ACB file, it is necessary to initialize the library using the settings which allow binder for the number of ACB files can be allocated.

This function is a return-on-complete function.
The time it takes to load an ACB file varies depending on the platform.
If this function is called at a timing when the screen needs to be updated such as in a game loop, the process is blocked in the unit of milliseconds, resulting in dropped frames.
Load the ACB file at a timing when load fluctuations is accepted such as when switching scenes.
See also
CriAtomExPlayer::SetCue
static CriAtomExAcb LoadAcbData ( IntPtr  acbData,
int  dataSize,
CriFsBinder  awbBinder,
string  awbPath 
)
inlinestatic

Loads the ACB data

Parameters
acbDataPointer to the fixed ACB data
dataSizeACB data size
awbBinderBinder object for AWB
awbPathPath of the AWB file
Returns
CriAtomExAcb object
Description:
Loads the ACB file from memory and import the information required for Cue playback.

The path of the AWB file used for streaming playback should be specified in the second argument "awbPath".
(When loading ACB data for in-memory playback, the value set in awbPath will be ignored.)
When the AWB file is packed in a CPK file, a CriFsBinder object that binds the CPK file must be specified in the secound argument "binder".

After loading the ACB file, an CriAtomExAcb object ( CriWare.CriAtomExAcb ) will be returned for accessing the ACB data.
You can play Cues from the ACB file by calling the CriWare.CriAtomExPlayer::SetCue function of the AtomExPlayer and passing the ACB handle and the Cue name.

This function will return null if the ACB file fails to load.
Note:
The library must be initialized before calling this function.

The ACB handle internally allocates a binder ( CriFsBinder ).
When loading an ACB file, it is necessary to initialize the library using the settings which allow binder for the number of ACB files can be allocated.

This function is a return-on-complete function.
The time it takes to load an ACB file varies depending on the platform.
If this function is called at a timing when the screen needs to be updated such as in a game loop, the process is blocked in the unit of milliseconds, resulting in dropped frames.
Load the ACB file at a timing when load fluctuations is accepted such as when switching scenes.
Note:
This method is intended to be used with unmanaged data in memory, so acbData must be a pointer to some data with a fixed memory address.
To pass an array of bytes from the managed memory, please call the CriAtomExAcb.LoadAcbData(byte[], CriFsBinder, string) function instead.
See also
CriAtomExPlayer::SetCue
override void Dispose ( )
inline

Unloads the ACB file

Description:
Unloads the loaded ACB file.
Note:
Calling this function will stop all Cues that reference the ACB file to be unloaded.
(After this function is called, the work area used to create the ACB handle or the area where the ACB data was placed is not referenced.)
Note:
When this function is called, the library performs a search to check if there are any Atom players referencing the ACB data to be discarded.
Therefore, if you create/discard an Atom player in the different thread while this function is running, serious problems such as access violation or deadlock may be triggered.
See also
CriAtomExAcb::LoadAcbData, CriAtomExAcb::LoadAcbFile
bool Exists ( string  cueName)
inline

Checks the existence of the Cue (Cue name specified)

Parameters
cueNameCue name
Returns
Whether the Cue exists (exists: True, does not exist: False)
Description:
Gets whether the Cue with the specified name exists.
Returns True if it exists.
bool Exists ( int  cueId)
inline

Checking the existence of the Cue (Cue ID specified)

Parameters
cueIdCue ID
Returns
Whether the Cue exists (exists: True, does not exist: False)
Description:
Gets whether the Cue with the specified ID exists.
Returns True if it exists.
bool GetCueInfo ( string  cueName,
out CriAtomEx.CueInfo  info 
)
inline

Gets Cue information (Cue name specified)

Parameters
cueNameCue name
infoCue information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the Cue information by specifying the Cue name.
Returns False if there is no Cue with the specified name.
See also
CriAtomExAcb::GetCueInfoByIndex
bool GetCueInfo ( int  cueId,
out CriAtomEx.CueInfo  info 
)
inline

Gets Cue information (Cue ID specified)

Parameters
cueIdCue ID
infoCue information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the Cue information by specifying the Cue ID.
Returns False if there is no Cue with the specified ID.
See also
CriAtomExAcb::GetCueInfoByIndex
bool GetCueInfoByIndex ( int  index,
out CriAtomEx.CueInfo  info 
)
inline

Gets Cue information (Cue index specified)

Parameters
indexCue index
infoCue information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the Cue information by specifying the Cue index.
Returns False if there is no Cue with the specified index.
See also
CriAtomExAcb::GetCueInfo
CriAtomEx.CueInfo [] GetCueInfoList ( )
inline

Gets all Cue information

Returns
Cues information array
Description:
Gets all Cue information contained in the Acb file.
See also
CriAtomExAcb::GetCueInfo
bool GetWaveFormInfo ( string  cueName,
out CriAtomEx.WaveformInfo  info 
)
inline

Gets sound waveform information (Cue name specified)

Parameters
cueNameCue name
infoSound waveform information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the information on the sound waveform played by a Cue by specifying the Cue name.
If there are multiple sound waveforms played by that Cue, the information of the sound waveform played first in the first Track is obtained.
Returns false if there is no Cue with the specified name.
bool GetWaveFormInfo ( int  cueId,
out CriAtomEx.WaveformInfo  info 
)
inline

Gets the sound waveform information (Cue ID specified)

Parameters
cueIdCue ID
infoSound waveform information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the information on the sound waveform played by a Cue by specify the Cue ID.
If there are multiple sound waveforms played by that Cue, the information of the sound waveform played first in the first Track is obtained. Returns False if there is no Cue with the specified ID.
int GetNumCuePlaying ( string  name)
inline

Gets the number of Voices of the Cue for which Cue limit is set (Cue name specified)

Parameters
nameCue name
Returns
The number of Voices (-1 is returned when a Cue with no Cue limit is specified)
Description:
Gets the number of Voices of the Cue with a Cue limit by specifying the Cue name.
Returns -1 if there is no Cue with the specified name, or if the specified Cue has no Cue limit.
int GetNumCuePlaying ( int  id)
inline

Gets the number of Voices of the Cue for which Cue limit is set (Cue ID specified)

Parameters
idCue ID
Returns
The number of Voices (-1 is returned when a Cue with no Cue limit is specified)
Description:
Gets the number of Voices of the Cue with a Cue limit by specifying the Cue ID.
Returns -1 if there is no Cue with the specified ID, or if the specified Cue has no Cue limit.
int GetBlockIndex ( string  cueName,
string  blockName 
)
inline

Gets the Block index (Cue name specified)

Parameters
cueNameCue name
blockNameBlock name
Returns
Block index
Description:
Get the Block index from the Cue name and the Block name.
Returns 0xFFFFFFFF if there is no Cue with the specified name or the Block name.
int GetBlockIndex ( int  cueId,
string  blockName 
)
inline

Gets Block index (Cue ID specified)

Parameters
cueIdCue ID
blockNameBlock name
Returns
Block index
Description:
Gets the Block index from the Cue ID and the Block name.
Returns 0xFFFFFFFF if there is no Cue with the specified ID or the Block name.
int GetNumUsableAisacControls ( string  cueName)
inline

Gets the number of AISAC Controls that can be controlled by a Cue (Cue name specified)

Parameters
cueNameCue name
Returns
The number of AISAC Controls
Description:
Gets the number of AISAC Controls that can be controlled by the Cue by specifying the Cue name.
Returns -1 if there is no Cue with the specified name.
See also
CriAtomExAcb::GetUsableAisacControl
int GetNumUsableAisacControls ( int  cueId)
inline

Gets the number of AISAC Controls that can be controlled by a Cue (Cue ID specified)

Parameters
cueIdCue ID
Returns
The number of AISAC Controls
Description:
Gets the number of AISAC Controls that can be controlled by the Cue by specifying the Cue ID.
Returns -1 if there is no Cue with the specified ID.
See also
CriAtomExAcb::GetUsableAisacControl
bool GetUsableAisacControl ( string  cueName,
int  index,
out CriAtomEx.AisacControlInfo  info 
)
inline

Gets the AISAC Controls that can be controlled by a Cue (Cue name specified)

Parameters
cueNameCue name
indexAISAC Control index
infoAISAC Control information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the AISAC Control information by specifying the Cue name and the AISAC Control index.
Returns False if there is no Cue with the specified name.
See also
CriAtomExAcb::GetNumUsableAisacControls
bool GetUsableAisacControl ( int  cueId,
int  index,
out CriAtomEx.AisacControlInfo  info 
)
inline

Gets the AISAC Controls that can be controlled by a Cue (Cue ID specified)

Parameters
cueIdCue ID
indexAISAC Control index
infoAISAC Control information
Returns
Whether the acquisition was successful (success: True, failure: False)
Description:
Gets the AISAC Control information by specifying the Cue ID and the AISAC Control index.
Returns False if there is no Cue with the specified ID.
See also
CriAtomExAcb::GetNumUsableAisacControls
void ResetCueTypeState ( string  cueName)
inline

Resets the Cue type state (Cue name specified)

Parameters
cueNameCue name
Description:
Resets the Cue type state by specifying the Cue name.
Note:
Only the state of the specified Cue is reset. The status of the sub synth contained in the Cue or Cue link destinations is not reset.
Note:
The Cue type state is a mechanism that manages the previously played Track as a state when playing a Cue other than the Polyphonic type Cue
This function resets the state management area to the state immediately after ACB loading.
void ResetCueTypeState ( int  cueId)
inline

Resets the Cue type state (Cue ID specified)

Parameters
cueIdCue name
Description:
Resets the Cue type state by specifying the Cue name.
Note:
Only the state of the specified Cue is reset. The status of the sub synth contained in the Cue or Cue link destinations is not reset.
Note:
The Cue type state is a mechanism that manages the previously played Track as a state when playing a Cue other than the Polyphonic type Cue
This function resets the state management area to the state immediately after ACB loading.
void AttachAwbFile ( CriFsBinder  awb_binder,
string  awb_path,
string  awb_name 
)
inline

Attaches the AWB file for streaming

Parameters
awb_binderHandle of the binder containing the AWB files
awb_pathPath of the AWB file
awb_nameAWB name
Description:
Attaches an AWB file for the stream to the ACB handle. For the first argument awb_binder and the second argument awb_path, specify the AWB file for stream playback.
The third argument awb_name is used to specify the slot to which the AWB is attached. Therefore, if you changed the AWB name output by AtomCraft (the base file name without extension), specify the original AWB name.
An error callback is called when the attachment of the AWB file fails.
The reason for the failure can be determined from the error callback message.
Note:
When the AWB is attached, the binder ( CriFsBinderHn ) and loader ( CriFsLoaderHn ) are allocated inside the library.
If you want to attach additional AWB files, you need to initialize the Atom library (or the CRI File System library) using the settings which allow the allocation of additional binders and loaders.
void DetachAwbFile ( string  awb_name)
inline

Detaches the AWB file for streaming

Parameters
awb_nameAWB name
Description:
Detaches the AWB file for the stream attached to the ACB handle. For the first argument awb_name, specify the same AWB name as that specified when attaching the AWB.
bool IsReadyToRelease ( )
inline

Gets the immediate release state of the ACB handle

Returns
Status of ACB (True = instant release possible, False = there are players playing)
Description:
Checks if the ACB handle can be released immediately.
Calling the CriWare.CriAtomExAcb::Dispose at the timing when this function returns false and will stop the player referencing the ACB handle.
(For the ACB handle for stream playback, the process may block for a long time in the CriWare.CriAtomExAcb::Dispose function because it waits for the completion of file read.)

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