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

3D Transceiver object More...

Inherits CriDisposable.

Public Member Functions

 CriAtomEx3dTransceiver ()
 Creates a 3D Transceiver object More...
 
override void Dispose ()
 Discards a 3D Transceiver object More...
 
void Update ()
 Updates the 3D Transceiver More...
 
void SetInputPosition (Vector3 position)
 Sets the position of the 3D Transceiver input More...
 
void SetOutputPosition (Vector3 position)
 Sets the position of the 3D Transceiver output More...
 
void SetInputOrientation (Vector3 front, Vector3 top)
 Sets the orientation of the 3D Transceiver input More...
 
void SetOutputOrientation (Vector3 front, Vector3 top)
 Sets the orientation of the 3D Transceiver output More...
 
void SetOutputConeParameter (float insideAngle, float outsideAngle, float outsideVolume)
 Sets the sound cone parameters for the 3D Transceiver output More...
 
void SetOutputMinMaxDistance (float minDistance, float maxDistance)
 Sets the minimum/maximum distance of the 3D Transceiver output More...
 
void SetOutputInteriorPanField (float radius, float interiorDistance)
 Sets the interior Panning boundary distance for the 3D Transceiver output More...
 
void SetInputCrossFadeField (float directAudioRadius, float crossfadeDistance)
 Sets the cross-fade boundary distance of the 3D Transceiver input More...
 
void SetOutputVolume (float volume)
 Sets the 3D Transceiver output volume More...
 
void AttachAisac (string globalAisacName)
 Attach AISAC to the 3D Transceiver More...
 
void DetachAisac (string globalAisacName)
 Detach AISAC from the 3D Transceiver More...
 
void SetMaxAngleAisacDelta (float maxDelta)
 Sets the maximum amount of change in angle AISAC control value More...
 
void SetDistanceAisacControlId (ushort aisacControlId)
 Sets the Distance AISAC Control ID More...
 
void SetListenerBasedAzimuthAngleAisacControlId (ushort aisacControlId)
 Sets the listener reference azimuth AISAC control setting ID More...
 
void SetListenerBasedElevationAngleAisacControlId (ushort aisacControlId)
 Sets the listener reference elevation AISAC control setting ID More...
 
void SetTransceiverOutputBasedAzimuthAngleAisacControlId (ushort aisacControlId)
 Sets the 3D Transceiver output reference azimuth AISAC control ID More...
 
void SetTransceiverOutputBasedElevationAngleAisacControlId (ushort aisacControlId)
 Sets the 3D Transceiver output reference elevation AISAC control ID More...
 
void Set3dRegion (CriAtomEx3dRegion region3d)
 Sets the 3D region More...
 

Detailed Description

3D Transceiver object

Description:
An object for handling the 3D Transceivers.

You set the parameters or location information of the 3D Transceiver through this object.

Constructor & Destructor Documentation

Creates a 3D Transceiver object

Description:
Creates a 3D Transceiver.
Note:
The library must be initialized before calling this function.

Member Function Documentation

override void Dispose ( )
inline

Discards a 3D Transceiver object

Description:
Discards the 3D Transceiver object.
When this function is called, all the resources allocated in the DLL when creating the 3D Transceiver object are released,
and the 3D Transceiver is disabled.
void Update ( )
inline

Updates the 3D Transceiver

Description:
Updates the 3D Transceiver using the parameters set for the 3D Transceiver.
This function updates all the parameters set in the 3D Transceiver.
It is more efficient to change multiple parameters before performing update than to update using this function each time a parameter is changed.
Note:
This function runs independently of the parameter update in the AtomExPlayer ( CriWare.CriAtomExPlayer::UpdateAll , CriAtomExPlayer::Update ).
If you change the parameters of the 3D transceiver, perform the update process using this function.
Example:

: // トランシーバーの作成 CriAtomEx3dTransceiver transceiver = new CriAtomEx3dTransceiver(); : // トランシーバーの入力位置を設定 transceiver.SetInputPosition(Vector3.zero);

// トランシーバーの出力位置を設定 transceiver.SetOutputPosition(Vector3.zero);

// 注意)この時点ではトランシーバーの位置はまだ変更されていません。

// 変更の適用 transceiver.Update(); :

void SetInputPosition ( Vector3  position)
inline

Sets the position of the 3D Transceiver input

Parameters
positionInput position vector
Description:
Sets the position of the 3D Transceiver input.
The position is used for calculating the distance attenuation and localization.
The position is specified as a 3D vector.
The default is (0.0f, 0.0f, 0.0f).
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetOutputPosition ( Vector3  position)
inline

Sets the position of the 3D Transceiver output

Parameters
positionOutput position vector
Description:
Sets the position of the 3D Transceiver output.
The position is used for calculating the distance attenuation and localization.
The position is specified as a 3D vector.
The default is (0.0f, 0.0f, 0.0f).
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetInputOrientation ( Vector3  front,
Vector3  top 
)
inline

Sets the orientation of the 3D Transceiver input

Parameters
frontForward vector
topUpper vector
Description:
Sets the orientation of the 3D Transceiver using the forward and upward vectors.
The orientation is specified using a 3D vector. The orientation vector that is set is normalized inside the library before being used.
The default values are as follows:
  • Forward vector: (0.0f, 0.0f, 1.0f)
  • Upward vector: (0.0f, 1.0f, 0.0f)
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetOutputOrientation ( Vector3  front,
Vector3  top 
)
inline

Sets the orientation of the 3D Transceiver output

Parameters
frontForward vector
topUpper vector
Description:
Sets the orientation of the 3D Transceiver using the forward and upward vectors.
The orientation is specified using a 3D vector. The orientation vector that is set is normalized inside the library before being used.
The default values are as follows:
  • Forward vector: (0.0f, 0.0f, 1.0f)
  • Upward vector: (0.0f, 1.0f, 0.0f)
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetOutputConeParameter ( float  insideAngle,
float  outsideAngle,
float  outsideVolume 
)
inline

Sets the sound cone parameters for the 3D Transceiver output

Parameters
insideAngleSound cone inside angle
outsideAngleSound cone outside angle
outsideVolumeSound cone outside volume
Description:
Sets the sound cone parameters for the 3D Transceiver output.
The sound cone represents the direction in which the sound is emitted from the transceiver and is used to express the directionality of the sound.
The sound cone consists of inner cone and outer cone. The inside angle represents the angle of the inner cone, the outside angle represents the angle of the outer cone, and the outside volume represents the volume beyond the outer cone angle.
At angles smaller than the inner cone angle, no attenuation is applied by the cone. In the direction between the inner and outer cones, the sound is gradually attenuated to the outside volume.
The inside and outside angles are specified within the range of 0.0f to 360.0f.
The outside volume is specifies as a scale factor for the amplitude within the range of 0.0f to 1.0f (the unit is not decibel).
The default values when initializing the library are as follows, and no attenuation is applied by the cone.
  • Inside angle: 360.0f
  • Outside angle: 360.0f
  • Outside volume: 0.0f .
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetOutputMinMaxDistance ( float  minDistance,
float  maxDistance 
)
inline

Sets the minimum/maximum distance of the 3D Transceiver output

Parameters
minDistanceMinimum distance
maxDistanceMaximum distance
Description:
Sets the minimum/maximum distance of the 3D Transceiver output.
The minimum distance represents the distance at which the volume cannot be increased any further.
The maximum distance is the distance with the lowest volume.
The default values when the library is initialized are as follows:
  • Minimum distance: 0.0f
  • Maximum distance: 0.0f
When this function is called when the minimum/maximum distances are set on the data, the values on the data are overridden (ignored).
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetOutputInteriorPanField ( float  radius,
float  interiorDistance 
)
inline

Sets the interior Panning boundary distance for the 3D Transceiver output

Parameters
radiusRadius of the 3D Transceiver output
interiorDistanceInterior distance
Description:
Sets the interior Panning boundary distance for the 3D Transceiver output.
The radius of the 3D Transceiver output is the radius when the 3D Transceiver output is considered as a sphere.
Interior distance is the distance from the radius of the 3D sound source to which the interior Panning is applied.
Within the radius of the 3D Transceiver output, interior Panning is applied, but since the interior distance is treated as 0.0, the sound is played back from all speakers at the same volume.
Within the interior distance, interior Panning is applied.
Outside the interior distance, interior Panning is not applied and the sound is played from 1 or 2 speakers closest to the 3D Transceiver output position.
The default values when the library is initialized are as follows:
  • 3D Transceiver radius: 0.0f
  • Interior distance: 0.0f (depends on the minimum distance of the 3D Transceiver) .
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update, CriAtomEx3dTransceiver::SetMinMaxDistance
void SetInputCrossFadeField ( float  directAudioRadius,
float  crossfadeDistance 
)
inline

Sets the cross-fade boundary distance of the 3D Transceiver input

Parameters
directAudioRadiusRadius of direct sound area
crossfadeDistanceCross-fade distance
Description:
Sets the cross-fade boundary distance of the 3D Transceiver input.
Within the radius of the direct sound area, the sound from the 3D Transceiver output is not played, and only the sound from the 3D sound source is played.
The cross-fade distance is the distance from the direct sound area where the cross-fade of the 3D Transceiver output and the sound from the 3D source is applied.
In the direct sound area, the sound from the sound source =1 and the sound from the 3D Transceiver is =0, so the sound from the 3D Transceiver output is inaudible and only the sound from the sound source is played.
Within the cross-fade distance, the cross0fade is applied depending on the position of the listener.
Outside the cross-fade distance, the sound from the 3D sound source is not heard, only the sound from the 3D Transceiver output is heard. The default values when the library is initialized are as follows:
  • Radius of direct sound area: 0.0f
  • Cross-fade distance: 0.0f .
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update, CriAtomEx3dTransceiver::SetMinMaxDistance
void SetOutputVolume ( float  volume)
inline

Sets the 3D Transceiver output volume

Parameters
volumeVolume
Description:
Sets the volume of the 3D Transceiver output.
The volume of the 3D Transceiver output affects only the volume related to localization (L,R,SL,SR), and does not affect the output level of LFE or the center.
For the volume value, specify a real value in the range of 0.0f to 1.0f.
The volume value is a scale factor for the amplitude of the sound data (the unit is not decibel).
For example, if you specify 1.0f, the original sound is played at its unmodified volume.
If you specify 0.5f, the sound is played at the volume by halving the amplitude (-6dB) of the original waveform.
If you specify 0.0f, the sound is muted (silent).
The default value when the library is initialized is 1.0f.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void AttachAisac ( string  globalAisacName)
inline

Attach AISAC to the 3D Transceiver

Parameters
globalAisacNameGlobal AISAC name to attach
Description:
Attach AISAC to the 3D Transceiver. By attaching AISAC, you can get AISAC effect even if you didn't set AISAC for the Cue or the Track.

If attaching AISAC failed, CriWareErrorHandler calls the error callback.
Check the error message for the reason why the attaching AISAC failed.
Note:
Only the global ACF included in the global settings (AISAC file) can be attached.
To get the effect of AISAC , it is necessary to set the appropriate AISAC control value in the same way as the AISAC set for Cues or Tracks.
Note:
Even if "an AISAC to change AISAC control value" is set for the Cue or Track, the applied AISAC control value does not affect the AISAC attached to the 3Dtransceiver.
Currently, it does not support the AISAC attachment of control type "Automodulation" or "Random".
Currently, the maximum number of AISACs that can be attached to a 3D Transceiver is fixed to 8.
See also
CriAtomEx3dTransceiver::DetachAisac
void DetachAisac ( string  globalAisacName)
inline

Detach AISAC from the 3D Transceiver

Parameters
globalAisacNameGlobal AISAC name to detach
Description:
Detach (remove) AISAC from the 3D Transceiver.

If detaching AISAC fails, CriWareErrorHandler calls the error callback.
Check the error message for the reason why detaching AISAC failed.
See also
CriAtomEx3dTransceiver::AttachAisac
void SetMaxAngleAisacDelta ( float  maxDelta)
inline

Sets the maximum amount of change in angle AISAC control value

Parameters
maxDeltaMaximum amount of change in angle AISAC control value
Description:
Sets the maximum amount of change when the AISAC control value is changed by the angle AISAC.
By changing the maximum amount of change to a lower value, the change of the AISAC control value by angle AISAC can be made smooth even if the relative angle between 3D the transceiver and the listener changes abruptly.
For example, if (0.5f / 30.0f) is set, the change takes place over 30 frames when the angle changes from 0° to 180°.
The default value is 1.0f (no limit). Since this parameter cannot be set on the data, the value set using this function is always used.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
The maximum amount of change set by this function is applied only to the change of the angle AISAC control value calculated based on the localization angle. It does not affect the localization angle itself.
See also
CriAtomEx3dTransceiver::Update
void SetDistanceAisacControlId ( ushort  aisacControlId)
inline

Sets the Distance AISAC Control ID

Parameters
aisacControlIdDistance AISAC Control ID
Description:
Specifies the AISAC control ID that is linked to the distance attenuation between the minimum distance and the maximum distance.
If the AISAC control ID is set by this function, the default distance attenuation becomes invalid.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetListenerBasedAzimuthAngleAisacControlId ( ushort  aisacControlId)
inline

Sets the listener reference azimuth AISAC control setting ID

Parameters
aisacControlIdListener reference azimuth AISAC control ID
Description:
Specifies the AISAC control ID linked to the azimuth of the 3D Transceiver seen from the listener.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetListenerBasedElevationAngleAisacControlId ( ushort  aisacControlId)
inline

Sets the listener reference elevation AISAC control setting ID

Parameters
aisacControlIdListener reference elevation AISAC control ID
Description:
Specifies the AISAC control ID linked to the elevation of the 3D Transceiver seen from the listener.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetTransceiverOutputBasedAzimuthAngleAisacControlId ( ushort  aisacControlId)
inline

Sets the 3D Transceiver output reference azimuth AISAC control ID

Parameters
aisacControlId3D Transceiver reference azimuth AISAC control ID
Description:
Specify the AISAC control ID linked to the azimuth of listener as seen from the position of the 3D Transceiver output.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void SetTransceiverOutputBasedElevationAngleAisacControlId ( ushort  aisacControlId)
inline

Sets the 3D Transceiver output reference elevation AISAC control ID

Parameters
aisacControlId3D Transceiver reference elevation AISAC control ID
Description:
Specify the AISAC control ID linked to the elevation of listener as seen from the position of the 3D Transceiver output.
Note:
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dTransceiver::Update function.
See also
CriAtomEx3dTransceiver::Update
void Set3dRegion ( CriAtomEx3dRegion  region3d)
inline

Sets the 3D region

Description:
Set the 3D regions to the 3D sound source.
Note:
If the regions set to the 3D sound source and 3D listener set to the same ExPlayer are different,
and if there is no 3D Transceiver that has the same region as the 3D sound source, the sound is muted.
To actually apply the set parameters, you need to call the CriWare.CriAtomEx3dSource::Update function.
See also
CriAtomEx3dRegion::Create, CriAtomEx3dTransceiver::Update

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