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

A class for getting the estimated delay value for sound playback. More...

Classes

struct  EstimatorInfo
 Status More...
 

Public Types

enum  Status { Stop, Processing, Done, Error }
 Status More...
 

Static Public Member Functions

static void InitializeModule ()
 Initialize the delay estimation process More...
 
static void FinalizeModule ()
 Terminates the delay estimation process More...
 
static CriAtomExLatencyEstimator.EstimatorInfo GetCurrentInfo ()
 Gets information on delay estimation More...
 

Detailed Description

A class for getting the estimated delay value for sound playback.

Description:
In this class, you can change the volume or measure the level by operating the bus output of the Atom sound renderer.

Member Enumeration Documentation

enum Status
strong

Status

Description:
A value that indicates the status of the delay estimation.
It can get using the CriWare.CriAtomExLatencyEstimator::GetCurrentInfo function.

Enumerator
Stop 

Initial state/stopped state

Processing 

Estimating delay time

Done 

Delay time estimation completed

Error 

Error

Member Function Documentation

static void InitializeModule ( )
inlinestatic

Initialize the delay estimation process

Call condition:
Call this function after initializing the plug-in.
Description:
Starts the delay estimation process for sound playback.

If you use the CriAtomExLatencyEstimator to obtain the sound delay estimation value, you must always do initialization using this function.
If you could get the estimated value or if an error occurs, call the CriAtomExLatencyEstimator.Finalize function.
Note:
Multiple calls to this function are allowed, but the number of calls is internally counted, and the actual initialization done only at the first call.
See also
CriAtomExLatencyEstimator.FinalizeModule
static void FinalizeModule ( )
inlinestatic

Terminates the delay estimation process

Description:
Finishes the delay estimation for sound playback.

When the delay estimation value is acquired, call this function to end the estimation process. Also, call this function if an error occurs or if you want to interrupt the estimation process.
Note:
When the CriAtomExLatencyEstimator.InitializeModule function is called multiple times, the number of calls (reference count) is incremented internally. The termination process is not invoked until the reference count reaches 0, so when you performed initialization multiple times, call this function until the reference count becomes 0.
See also
CriAtomExLatencyEstimator.InitializeModule
static CriAtomExLatencyEstimator.EstimatorInfo GetCurrentInfo ( )
inlinestatic

Gets information on delay estimation

Description:
Gets the current information on the delay estimation.
The information that can be acquired is "delay estimator status" and "estimated delay time (ms)".

The estimated_latency obtained when the status changes to Status.Done is the estimated value.
Note that the estimated delay value cannot be obtained immediately. Before it changes from Status.Processsing to Status.Done, it takes tens to hundreds of milliseconds. (The time it takes depends on the Atom initialization settings and device)
The value of estmated_latency when the status is not Status.Done is invalid. Make sure that the status is Status.Done before recording the value of estimated_latency.

After calling this function to get the estimated value, call riAtomExLatencyEstimator.Finalize to finalize the process.
See also
CriAtomExLatencyEstimator.InitializeModule, CriAtomExLatencyEstimator.FinalizeModule

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