CRIWARE Unity Plugin Manual
Last Updated: 2024-07-12
|
AtomExPlayer More...
Inherits CriDisposable.
Public Types | |
enum | Status { Stop = 0, Prep, Playing, PlayEnd, Error } |
Player status More... | |
enum | TimeStretchParameterId : int { Ratio = 0, FrameTime = 1, Quality = 2 } |
Parameters for time stretch More... | |
enum | PitchShifterParameterId : int { Pitch = 0, Formant = 1, Mode = 2 } |
Parameters for pitch shifter More... | |
Public Member Functions | |
CriAtomExPlayer () | |
Creates an AtomExPlayer More... | |
CriAtomExPlayer (int maxPath, int maxPathStrings) | |
Creates an AtomExPlayer (for single file playback) More... | |
CriAtomExPlayer (bool enableAudioSyncedTimer) | |
Creates an AtomExPlayer (using sound synchronization timer) More... | |
CriAtomExPlayer (int maxPath, int maxPathStrings, bool enableAudioSyncedTimer) | |
Creates an AtomExPlayer (single file playback, using sound synchronization timer) More... | |
override void | Dispose () |
Discards an AtomExPlayer More... | |
void | SetCue (CriAtomExAcb acb, string name) |
Sets the sound data (Cue name specified) More... | |
void | SetCue (CriAtomExAcb acb, int id) |
Sets the sound data (Cue ID specified) More... | |
void | SetCueIndex (CriAtomExAcb acb, int index) |
Sets the sound data (Cue index specified) More... | |
void | SetContentId (CriFsBinder binder, int contentId) |
Sets the sound data (CPK content ID specified) More... | |
void | SetFile (CriFsBinder binder, string path) |
Sets the sound data (file name specified) More... | |
void | SetData (byte[] buffer, int size) |
Sets the sound data (on-memory byte array specified) More... | |
void | SetData (IntPtr buffer, int size) |
Sets the sound data (on-memory buffer address specified) More... | |
void | SetFormat (CriAtomEx.Format format) |
Specifies the format More... | |
void | SetNumChannels (int numChannels) |
Specifies the number of channels More... | |
void | SetSamplingRate (int samplingRate) |
Specifies the sampling rate More... | |
void | PrepareEntryPool (int capacity, bool stopOnEmpty) |
Creates an entry pool for concatenated playback More... | |
int | GetNumEntries () |
The number of concatenated playback data entries More... | |
int | GetNumConsumedEntries () |
Number of entries consumed by the playback process More... | |
bool | EntryFile (CriFsBinder binder, string path, bool repeat) |
Inputs the data for linked playback (file name specified) More... | |
bool | EntryContentId (CriFsBinder binder, int contentId, bool repeat) |
Inputs the data for linked playback (CPK content ID specified) More... | |
bool | EntryData (byte[] buffer, int size, bool repeat) |
Enters the concatenated playback data (on-memory byte array specified) More... | |
bool | EntryData (IntPtr buffer, int size, bool repeat) |
Enters the concatenated playback data (on-memory buffer address specified) More... | |
bool | EntryCue (CriAtomExAcb acb, string name, bool repeat) |
Inputs the data for linked playback (Cue name specified) More... | |
CriAtomExPlayback | Start () |
Starts playback More... | |
CriAtomExPlayback | Prepare () |
Prepare for playback More... | |
void | Stop (bool ignoresReleaseTime) |
Stop playing More... | |
void | Pause () |
Pause More... | |
void | Resume (CriAtomEx.ResumeMode mode) |
Cancels the pausing More... | |
bool | IsPaused () |
Gets the pausing status More... | |
void | SetVolume (float volume) |
Sets the volume More... | |
void | SetPitch (float pitch) |
Sets the pitch More... | |
void | SetPlaybackRatio (float ratio) |
Sequence playback ratio setting More... | |
void | SetPan3dAngle (float angle) |
Sets the Panning 3D angle More... | |
void | SetPan3dInteriorDistance (float distance) |
Sets the Panning 3D distance More... | |
void | SetPan3dVolume (float volume) |
Sets the Panning 3D volume More... | |
void | SetPanType (CriAtomEx.PanType panType) |
Sets the Panning type More... | |
void | SetSendLevel (int channel, CriAtomEx.Speaker id, float level) |
Sets the send level More... | |
void | SetBiquadFilterParameters (CriAtomEx.BiquadFilterType type, float frequency, float gain, float q) |
Sets the parameters of the Biquad Filter More... | |
void | SetBandpassFilterParameters (float cofLow, float cofHigh) |
Sets BandPass Filter parameters More... | |
void | SetBusSendLevel (string busName, float level) |
Sets the Bus Send Level (bus name specified) More... | |
bool | GetBusSendLevel (string busName, out float level) |
Obtaining the bus send level (specifying the bus name) More... | |
void | SetBusSendLevel (int busId, float level) |
void | SetBusSendLevelOffset (string busName, float levelOffset) |
Sets the Bus Send Level by offset (bus name specified) More... | |
bool | GetBusSendLevelOffset (string busName, out float level) |
Obtaining the offset of the bus send level (specifying the bus name) More... | |
void | SetBusSendLevelOffset (int busId, float levelOffset) |
void | AttachAisac (string globalAisacName) |
Attaches AISAC to the player More... | |
void | DetachAisac (string globalAisacName) |
Separates AISAC from the player More... | |
void | SetAisacControl (string controlName, float value) |
Sets the AISAC control value (specifying the control name) More... | |
void | SetAisac (string controlName, float value) |
void | SetAisacControl (uint controlId, float value) |
Sets the AISAC control value (specifying the control ID) More... | |
void | SetAisac (uint controlId, float value) |
bool | GetAttachedAisacInfo (int aisacAttachedIndex, out CriAtomEx.AisacInfo aisacInfo) |
Gets information on AISAC attached to the player More... | |
void | Set3dSource (CriAtomEx3dSource source) |
Sets a 3D sound source object More... | |
void | Set3dListener (CriAtomEx3dListener listener) |
Sets the 3D listener object More... | |
void | SetStartTime (long startTimeMs) |
Specifies the playback start position More... | |
void | SetFirstBlockIndex (int index) |
Sets the playback start Block (Block index specified) More... | |
void | SetSelectorLabel (string selector, string label) |
Sets the selector information More... | |
void | UnsetSelectorLabel (string selector) |
Removes the selector information that is set. More... | |
void | ClearSelectorLabels () |
Deletes all selector information More... | |
void | SetCategory (int categoryId) |
Sets the Category (ID specified) More... | |
void | SetCategory (string categoryName) |
Sets Category (Category name specified) More... | |
void | UnsetCategory () |
Removes Category More... | |
void | SetCuePriority (int priority) |
Sets the Cue priority More... | |
void | SetVoicePriority (int priority) |
Sets the Voice Priority More... | |
void | SetVoiceControlMethod (CriAtomEx.VoiceControlMethod method) |
Specifies the Voice control method More... | |
void | SetPreDelayTime (float time) |
Set the pre-delay time More... | |
void | SetEnvelopeAttackTime (float time) |
Sets the Envelope Attack Time More... | |
void | SetEnvelopeHoldTime (float time) |
Sets the envelope hold time More... | |
void | SetEnvelopeDecayTime (float time) |
Sets the envelope decay time More... | |
void | SetEnvelopeReleaseTime (float time) |
Sets the envelope release time More... | |
void | SetEnvelopeSustainLevel (float level) |
Sets the envelope sustain level More... | |
void | AttachFader () |
Attach a fader to a player More... | |
void | DetachFader () |
Remove a fader from a player More... | |
void | SetFadeOutTime (int ms) |
Sets the Fade-out time More... | |
void | SetFadeInTime (int ms) |
Sets the Fade-in time More... | |
void | SetFadeInStartOffset (int ms) |
Sets the Fade-in start offset More... | |
void | SetFadeOutEndDelay (int ms) |
Sets the delay time after Fade-out More... | |
bool | IsFading () |
Gets whether the fading is in process More... | |
void | ResetFaderParameters () |
Initializes the fader parameters More... | |
void | SetGroupNumber (int group_no) |
Specifies the group number More... | |
void | Update (CriAtomExPlayback playback) |
Updates the playback parameters (by CriAtomExPlayback object) More... | |
void | UpdateAll () |
Updates the playback parameters (for all sounds being played) More... | |
void | ResetParameters () |
Initializes the playback parameters More... | |
long | GetTime () |
Gets the playback time More... | |
Status | GetStatus () |
Gets the status More... | |
float | GetParameterFloat32 (CriAtomEx.Parameter id) |
Gets parameters (floating point numbers) More... | |
uint | GetParameterUint32 (CriAtomEx.Parameter id) |
Gets parameters (unsigned integer) More... | |
int | GetParameterSint32 (CriAtomEx.Parameter id) |
Gets parameters (signed integer) More... | |
void | SetSoundRendererType (CriAtomEx.SoundRendererType type) |
Sets the output sound renderer type More... | |
void | SetRandomSeed (uint seed) |
Sets the random number seed More... | |
void | Loop (bool sw) |
Switches on/off the loop playback More... | |
void | SetAsrRackId (int asr_rack_id) |
Specification of ASR Rack ID More... | |
void | SetVoicePoolIdentifier (uint identifier) |
Sets the Voice Pool identifier More... | |
void | SetDspTimeStretchRatio (float ratio) |
Sets the DSP time stretch ratio More... | |
void | SetDspPitchShifterPitch (float pitch) |
Sets the pitch shift amount of the DSP pitch shifter More... | |
void | SetDspParameter (int id, float value) |
Sets the DSP parameter More... | |
void | AttachTween (CriAtomExTween tween) |
Attaches an AtomExTween More... | |
void | DetachTween (CriAtomExTween tween) |
Detaches an AtomExTween More... | |
void | DetachTweenAll () |
Detaches all AtomExTween More... | |
void | SetEnvelopeAttackCurve (CriAtomEx.CurveType curveType, float strength) |
Setting the Attack curve of EG More... | |
void | SetEnvelopeDecayCurve (CriAtomEx.CurveType curveType, float strength) |
Setting the Decay curve of EG More... | |
void | SetEnvelopeReleaseCurve (CriAtomEx.CurveType curveType, float strength) |
Setting the Release curve of EG More... | |
void | AddOutputPort (CriAtomExOutputPort outputPort) |
Adding the output port object More... | |
void | RemoveOutputPort (CriAtomExOutputPort outputPort) |
Removing the output port object More... | |
void | ClearOutputPorts () |
Clearing the output port object More... | |
void | AddPreferredOutputPort (CriAtomExOutputPort outputPort) |
Adding the preferred output port object More... | |
void | RemovePreferredOutputPort (CriAtomExOutputPort outputPort) |
Removing the preferred output port object More... | |
void | RemovePreferredOutputPort (string name) |
Removing the preferred output port object by name More... | |
void | ClearPreferredOutputPorts () |
Clearing the preferred output port object More... | |
void | SetScheduleTime (System.Int64 scheduleTime) |
Schedule playback time More... | |
Static Public Attributes | |
static readonly uint | MaxOutputPorts = 8 |
Maximum number of output ports that can be specified per player More... | |
Properties | |
CriAtomExBeatSync.CbFunc | OnBeatSyncCallback |
Registers the Sequence event callback More... | |
CriAtomExSequencer.EventCallback | OnSequenceCallback |
Registers the beat synchronization callback More... | |
int | entryPoolCapacity [get] |
The number of concatenated playback data that can be input | |
AtomExPlayer
|
strong |
Player status
Enumerator | |
---|---|
Stop |
Stopped |
Prep |
Preparing for playback |
Playing |
Playing |
PlayEnd |
Playback completed |
Error |
Error occurred |
|
strong |
|
strong |
|
inline |
Creates an AtomExPlayer
|
inline |
Creates an AtomExPlayer (for single file playback)
maxPath | Maximum path string length |
maxPathStrings | The number of files that can be played simultaneously |
|
inline |
Creates an AtomExPlayer (using sound synchronization timer)
enableAudioSyncedTimer | Sound synchronization timer enabled flag |
|
inline |
Creates an AtomExPlayer (single file playback, using sound synchronization timer)
maxPath | Maximum path string length |
maxPathStrings | The number of files that can be played simultaneously |
enableAudioSyncedTimer | Sound synchronization timer enabled flag |
|
inline |
Discards an AtomExPlayer
|
inline |
Sets the sound data (Cue name specified)
acb | ACB object |
name | Cue name |
(The audio format, number of channels, sampling rate, etc. are automatically set based on the information in the ACB file.)
|
inline |
Sets the sound data (Cue ID specified)
acb | ACB object |
id | Cue ID |
(The audio format, number of channels, sampling rate, etc. are automatically set based on the information in the ACB file.)
|
inline |
Sets the sound data (Cue index specified)
acb | ACB object |
index | Cue index |
(The audio format, number of channels, sampling rate, etc. are automatically set based on the information in the ACB file.)
This function can be used to set the audio to play on a player without specifying the Cue name or the Cue ID.
(This function can be used for debugging purposes, since the contents in the ACB file can be played without specifying a Cue name or Cue ID.)
|
inline |
Sets the sound data (CPK content ID specified)
binder | Binder |
contentId | Content ID |
|
inline |
Sets the sound data (file name specified)
binder | Binder object |
path | File path |
|
inline |
Sets the sound data (on-memory byte array specified)
buffer | Byte array |
size | Buffer size |
|
inline |
Sets the sound data (on-memory buffer address specified)
buffer | Buffer address |
size | Buffer size |
|
inline |
Specifies the format
format | Format |
|
inline |
Specifies the number of channels
numChannels | The number of channels |
|
inline |
Specifies the sampling rate
samplingRate | Sampling rate |
|
inline |
Creates an entry pool for concatenated playback
capacity | The number of data that can be input |
stopOnEmpty | Whether to stop if the entry pool is empty |
|
inline |
The number of concatenated playback data entries
|
inline |
Number of entries consumed by the playback process
|
inline |
Inputs the data for linked playback (file name specified)
binder | Binder object |
path | File path |
repeat | Whether to repeat playback when the next data is not entered |
|
inline |
Inputs the data for linked playback (CPK content ID specified)
binder | Binder object |
contentId | Content ID |
repeat | Whether to repeat playback when the next data is not entered |
|
inline |
Enters the concatenated playback data (on-memory byte array specified)
buffer | On-memory byte array |
size | Buffer size |
repeat | Whether to repeat playback when the next data is not entered |
|
inline |
Enters the concatenated playback data (on-memory buffer address specified)
buffer | Buffer address |
size | Buffer size |
repeat | Whether to repeat playback when the next data is not entered |
|
inline |
Inputs the data for linked playback (Cue name specified)
acb | ACB handle |
name | Cue name |
repeat | Whether to repeat playback when the next data is not entered |
|
inline |
Starts playback
|
inline |
Prepare for playback
|
inline |
Stop playing
ignoresReleaseTime | Whether to ignore release time (False = perform release process, True = ignore release time and stop immediately) |
|
inline |
Pause
|
inline |
Cancels the pausing
mode | Unpausing target |
|
inline |
Gets the pausing status
|
inline |
Sets the volume
volume | Volume value |
|
inline |
Sets the pitch
pitch | Pitch (in cents) |
|
inline |
Sequence playback ratio setting
ratio | Sequence playback ratio |
|
inline |
Sets the Panning 3D angle
angle | Panning 3D angle (-180.0f to 180.0f: in degrees) |
|
inline |
Sets the Panning 3D distance
distance | Panning 3D distance (-1.0f to 1.0f) |
|
inline |
Sets the Panning 3D volume
volume | Panning 3D volume (0.0f to 1.0f) |
|
inline |
Sets the Panning type
panType | Panning type |
|
inline |
Sets the send level
channel | Channel number |
id | Speaker ID |
level | Send level value (0.0f to 1.0f) |
|
inline |
Sets the parameters of the Biquad Filter
type | Filter type |
frequency | Normalized frequency (0.0f to 1.0f) |
gain | Gain (decibels) |
q | Q value |
|
inline |
Sets BandPass Filter parameters
cofLow | Normalized low frequency cutoff frequency (0.0f to 1.0f) |
cofHigh | Normalized high frequency cutoff frequency (0.0f to 1.0f) |
|
inline |
Sets the Bus Send Level (bus name specified)
busName | Bus name |
level | Send level value (0.0f to 1.0f) |
|
inline |
Obtaining the bus send level (specifying the bus name)
busName | Bus name |
level | Send level value (0.0f to 1.0f) |
|
inline |
|
inline |
Sets the Bus Send Level by offset (bus name specified)
busName | Bus name |
levelOffset | Send level value (0.0f to 1.0f) |
|
inline |
Obtaining the offset of the bus send level (specifying the bus name)
busName | Bus name |
level | Send level offset value (0.0f to 1.0f) |
|
inline |
|
inline |
Attaches AISAC to the player
globalAisacName | Global AISAC name to attach |
|
inline |
Separates AISAC from the player
globalAisacName | Global AISAC name to detach |
|
inline |
Sets the AISAC control value (specifying the control name)
controlName | Control name |
value | Control value (0.0f to 1.0f) |
|
inline |
|
inline |
Sets the AISAC control value (specifying the control ID)
controlId | Control ID |
value | Control value (0.0f to 1.0f) |
|
inline |
|
inline |
Gets information on AISAC attached to the player
aisacAttachedIndex | Index of the attached AISAC |
aisacInfo | A structure for getting the AISAC information |
|
inline |
Sets a 3D sound source object
source | CriAtomEx3dSource object |
|
inline |
Sets the 3D listener object
listener | 3D listener object |
|
inline |
Specifies the playback start position
startTimeMs | Playback start position (in milliseconds) |
A 64bit value can be set for startTimeMs, but currently it is not possible to specify a playback time exceeding 32bit value.
When the Sequence is played back specifying the playback start position, the waveform data placed before the specified position is not played.
(Individual waveforms in the Sequence are not played from the middle.)
|
inline |
Sets the playback start Block (Block index specified)
index | Block index |
|
inline |
Sets the selector information
selector | Selector name |
label | Label name |
|
inline |
Removes the selector information that is set.
selector | Selector name |
|
inline |
Deletes all selector information
|
inline |
Sets the Category (ID specified)
categoryId | Category ID |
|
inline |
Sets Category (Category name specified)
categoryName | Category name |
|
inline |
Removes Category
|
inline |
Sets the Cue priority
priority | Cue priority |
|
inline |
Sets the Voice Priority
priority | Voice Priority (-255 to 255) |
|
inline |
Specifies the Voice control method
method | Voice control method |
|
inline |
Set the pre-delay time
time | Pre-delay time (0.0f to 2000.0f) |
|
inline |
Sets the Envelope Attack Time
time | Attack time (0.0f to 2000.0f) |
|
inline |
Sets the envelope hold time
time | Hold time (0.0f to 2000.0f) |
|
inline |
Sets the envelope decay time
time | Decay time (0.0f to 2000.0f) |
|
inline |
Sets the envelope release time
time | Release time (0.0f to 10000.0f) |
|
inline |
Sets the envelope sustain level
level | Sustain level (0.0f to 2000.0f) |
|
inline |
Attach a fader to a player
|
inline |
Remove a fader from a player
|
inline |
Sets the Fade-out time
ms | Fade out time (in milliseconds) |
|
inline |
Sets the Fade-in time
ms | Fade-in time (in millisecond) |
|
inline |
Sets the Fade-in start offset
ms | Fade-in start offset (in millisecond) |
|
inline |
Sets the delay time after Fade-out
ms | Delay time after Fade-out (in milliseconds) |
|
inline |
Gets whether the fading is in process
|
inline |
Initializes the fader parameters
|
inline |
Specifies the group number
|
inline |
Updates the playback parameters (by CriAtomExPlayback object)
playback | CriAtomExPlayback object |
|
inline |
Updates the playback parameters (for all sounds being played)
: // プレーヤの作成 CriAtomExPlayer player = new CriAtomExPlayer(); : // 再生の開始 CriAtomExPlayback playback = player.Start(); : // ボリュームの変更 // 注意)この時点では再生中の音声のパラメータは変更されない。 player.SetVolume(volume);
// プレーヤに設定されたパラメータを再生中の全ての音声に反映 player.UpdateAll(); :
|
inline |
Initializes the playback parameters
: // プレーヤの作成 CriAtomExPlayer player = new CriAtomExPlayer(); : // ボリュームの変更 player.SetVolume(0.5f);
// 音声を再生 // 備考)ここで再生された音声は0.5fのボリュームで出力される。 CriAtomExPlayback playback1 = player.Start();
// プレーヤに設定されたパラメータをリセット // 備考)プレーヤのボリューム設定がデフォルト値(1.0f)に戻される。 player.ResetParameters();
// 別の音を再生 // 備考)ここで再生された音声は1.0fのボリュームで出力される。 CriAtomExPlayback playback2 = player.Start(); :
|
inline |
Gets the playback time
|
inline |
Gets the status
|
inline |
Gets parameters (floating point numbers)
id | Parameter ID |
|
inline |
Gets parameters (unsigned integer)
id | Parameter ID |
|
inline |
Gets parameters (signed integer)
id | Parameter ID |
|
inline |
Sets the output sound renderer type
type | Output destination sound renderer type |
|
inline |
Sets the random number seed
seed | Random number seed |
|
inline |
Switches on/off the loop playback
sw | Loop switch (True: loop mode, False: cancel loop mode) |
|
inline |
Specification of ASR Rack ID
asr_rack_id | ASR Rack ID |
|
inline |
Sets the Voice Pool identifier
identifier | Voice Pool identifier |
|
inline |
Sets the DSP time stretch ratio
ratio | Stretch ratio |
|
inline |
Sets the pitch shift amount of the DSP pitch shifter
pitch | Pitch shift amount |
|
inline |
Sets the DSP parameter
id | Parameter ID |
value | Parameter value |
|
inline |
Attaches an AtomExTween
tween | AtomExTween Object |
|
inline |
|
inline |
Detaches all AtomExTween
|
inline |
Setting the Attack curve of EG
curveType | Curve Type |
strength | Curve Strength |
|
inline |
Setting the Decay curve of EG
curveType | Curve Type |
strength | Curve Strength |
|
inline |
Setting the Release curve of EG
curveType | Curve Type |
strength | Curve Strength |
|
inline |
Adding the output port object
outputPort | Output port object |
|
inline |
Removing the output port object
outputPort | Output port object |
|
inline |
Clearing the output port object
|
inline |
Adding the preferred output port object
outputPort | Output port object |
|
inline |
Removing the preferred output port object
outputPort | Output port object |
|
inline |
Removing the preferred output port object by name
name | Output port name |
|
inline |
Clearing the preferred output port object
Clear all the preferred output ports that were assigned to a player.
Clear all preferred output port objects added to the player with CriWare.CriAtomExPlayer.AddPreferredOutputPort.
To remove a specific preferred output port, use CriWare.CriAtomExPlayer.RemovePreferredOutputPort.
Removing the preferred output port does not affect any audio that has already started playing.
|
inline |
Schedule playback time
|
static |
Maximum number of output ports that can be specified per player
|
addremove |
Registers the Sequence event callback
|
addremove |
Registers the beat synchronization callback