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

Wave Voice Pool More...

Inheritance diagram for CriAtomExWaveVoicePool:
CriAtomExVoicePool

Classes

struct  Config
 Initialization configuration structure used when creating of Wave voice pool More...
 

Public Types

enum  VoicePoolId {
  StandardMemory = StandardMemoryAsrVoicePoolId, StandardStreaming = StandardStreamingAsrVoicePoolId, StandardMemory = StandardMemoryNsrVoicePoolId, StandardStreaming = StandardStreamingNsrVoicePoolId,
  HcaMxMemory = 4, HcaMxStreaming = 5, LowLatencyMemory = StandardMemoryNsrVoicePoolId, LowLatencyStreaming = StandardStreamingNsrVoicePoolId
}
 The ID to access the Voice Pool created inside the plug-in More...
 
enum  PitchShifterMode : int
 Pitch shifter DSP operation mode More...
 

Public Member Functions

 CriAtomExWaveVoicePool (Config config)
 Create a Wave Voice Pool More...
 
 CriAtomExWaveVoicePool (int numVoices, int maxChannels, int maxSamplingRate, bool streamingFlag, uint identifier=0)
 Creates a Wave Voice Pool More...
 
UsedVoicesInfo GetNumUsedVoices ()
 Gets the usage of Voices in the Voice Pool More...
 
override void Dispose ()
 Discards the Voice Pool More...
 
void AttachDspTimeStretch ()
 Attaches the time stretch DSP More...
 
void AttachDspPitchShifter (PitchShifterMode mode=PitchShifterMode.Music, int windosSize=1024, int overlapTimes=4)
 Attaches the pitch shifter DSP More...
 
void DetachDsp ()
 Detaches DSP More...
 

Static Public Member Functions

static void SetDefaultConfigForWaveVoicePool (ref Config config)
 Assign the default values to the configuration structure used to create a Wave Voice Pool
 
static UsedVoicesInfo GetNumUsedVoices (VoicePoolId voicePoolId)
 Gets the usage of Voices in the Voice Pool More...
 

Properties

uint identifier [get]
 Voice Pool identifier More...
 

Detailed Description

Wave Voice Pool

Member Enumeration Documentation

enum VoicePoolId
stronginherited

The ID to access the Voice Pool created inside the plug-in

See also
CriAtomExVoicePool.GetNumUsedVoices
Enumerator
StandardMemory 

Model standard memory playback Voice Pool ID

StandardStreaming 

Model standard streaming playback Voice Pool ID

StandardMemory 

Model standard memory playback Voice Pool ID

StandardStreaming 

Model standard streaming playback Voice Pool ID

HcaMxMemory 

HCA-MX memory playback Voice Pool ID

HcaMxStreaming 

A Voice Pool ID for HCA-MX streaming playback

LowLatencyMemory 

[Android] Low latency memory playback Voice Pool ID

LowLatencyStreaming 

[Android] Low latency streaming playback Voice Pool ID

enum PitchShifterMode : int
stronginherited

Pitch shifter DSP operation mode

Description:
Specifies the pitch shift processing method (algorithm).
See also
CriAtomExVoicePool.AttachDspPitchShifter, CriAtomExPlayer.SetDspParameter

Constructor & Destructor Documentation

CriAtomExWaveVoicePool ( Config  config)
inline

Create a Wave Voice Pool

Parameters
configInitialization configuration structure used when creating of Wave voice pool
Returns
Wave Voice Pool
Description:
By calling this function, Voices for Wave playback will be pooled.
When playing Wave data (or a Cue containing Wave data) with the AtomExPlayer, the AtomExPlayer will retrieve Voices from the Wave Voice Pool.
After playing, be sure to discard the object using the Dispose function.
Note:
Be sure to call the Dispose function to destroy the object after the playback is complete.
If you want to explicitly set a particular CriAtomExPlayer to get voices from the created voice pool,
please create the voice pool with a non-zero identifier (0 is the default identifier),
and call the CriAtomExPlayer::SetVoicePoolIdentifier function.
See also
CriAtomExPlayer::SetVoicePoolIdentifier
CriAtomExWaveVoicePool ( int  numVoices,
int  maxChannels,
int  maxSamplingRate,
bool  streamingFlag,
uint  identifier = 0 
)
inline

Creates a Wave Voice Pool

Parameters
numVoicesThe number of Voices
maxChannelsMaximum number of channels
maxSamplingRateMaximum sampling rate
streamingFlagStreaming playback flag
identifierVoice Pool identifier
Returns
Wave Voice Pool
Description:
Calling this function pools the Voices that can be played by Wave.
When you play Wave data (or a Cue that contains Wave data) in the AtomExPlayer, the AtomExPlayer gets the Voice from the created Wave Voice Pool and plays it.
After playing, be sure to discard the object using the Dispose function.
If you want to explicitly set a specific CriAtomExPlayer to get a Voice from the created Voice Pool, create a Voice with a specifying non-zero value as identifier, and call the CriAtomExPlayer::SetVoicePoolIdentifier function.
See also
CriAtomExPlayer::SetVoicePoolIdentifier

Member Function Documentation

static UsedVoicesInfo GetNumUsedVoices ( VoicePoolId  voicePoolId)
inlinestaticinherited

Gets the usage of Voices in the Voice Pool

Parameters
voicePoolIdVoice Pool ID
Returns
Voice usage
Description:
Gets the Voice usage of the specified Voice Pool.
Note:
Use this function only for debugging purposes.
See also
CriAtomExVoicePool::VoicePoolId, CriAtomExVoicePool::UsedVoicesInfo
UsedVoicesInfo GetNumUsedVoices ( )
inlineinherited

Gets the usage of Voices in the Voice Pool

Returns
Voice usage
Description:
Gets the Voice usage.
Note:
Use this function only for debugging purposes.
See also
CriAtomExVoicePool::UsedVoicesInfo
override void Dispose ( )
inlineinherited

Discards the Voice Pool

Description:
Discards the Voice Pool object.
Be sure to discard the created object using this API. Otherwise, a resource leak occurs.
void AttachDspTimeStretch ( )
inlineinherited

Attaches the time stretch DSP

Description:
Adds a time stretch DSP to the Voice Pool.
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
CriAtomExVoicePool::DetachInsertionDsp
void AttachDspPitchShifter ( PitchShifterMode  mode = PitchShifterMode.Music,
int  windosSize = 1024,
int  overlapTimes = 4 
)
inlineinherited

Attaches the pitch shifter DSP

Parameters
modePitch shift mode
windosSizeWindow size
overlapTimesThe number of overlaps
Description:
Adds a pitch shifter DSP to the Voice Pool.
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
CriAtomExVoicePool::DetachInsertionDsp
void DetachDsp ( )
inlineinherited

Detaches DSP

Description:
Removes the DSP added to the Voice Pool.
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
CriAtomExVoicePool::AttachDspPitchShifter, CriAtomExVoicePool::AttachDspTimeStretch

Property Documentation

uint identifier
getinherited

Voice Pool identifier

Description:
The voice pool identifier is the ID used to identify the voice pool.
Note:
By setting the same identifier for both the player (CriAtomExPlayer.SetVoicePoolIdentifier) and the Voice Pool,
the player will only get Voices from the configured Voice Pool.
See also
CriAtomExVoicePool::VoicePoolId, CriAtomExVoicePool::UsedVoicesInfo

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