Output Port
More...
Inherits CriDisposable.
Output Port
- Description:
- The output port is an object that makes it easier to manage and control audio output destinations.
This is useful when playing on a device's secondary output, or when using platform-specific playback functions.
Output port type
- Description:
- This value indicates the type of the output port.
- See also
- CriWare.CriAtomExOutputPort.Config
Enumerator |
---|
Audio |
Sound Type
- Description:
- Output port type for normal audio playback.
|
Vibration |
Vibration type
- Description:
- Output port type used to output audio-based vibrations.
|
Creating the output port object
- Parameters
-
config | Config structure used to create the output port |
- Returns
- Output port object
- Description:
- Create an output port object.
Output ports are linked to ASR Racks, and Voices for which an output port is specified will be played in the ASR Rack linked to that output port.
outputPortConfig.name = "SampleOutputPort1";
outputPort.SetAsrRackId(rackId);
return outputPort;
}
- Note:
- The output port object set in the ACF file will be automatically created in the ACF when the ACF file is
registered using CriAtomEx.RegisterAcf, so it is not necessary to use this function to create new objects.
The output port object created like this can be obtained by CriWare.CriAtomExAcf.GetOutputPort.
This function should be used when an additional output port object is required by the application.
If successful, this function returns the output port object that was created.
If it fails, null is returned.
- Note:
- The output port object created by this function is assigned the following ASR Rack ID based on the type specified in CriWare.CriAtomExOutputPort.Config.type:
Before using the output port object, be sure to set the appropriate ASR Rack with CriWare.CriAtomExOutputPort.SetAsrRackId.
Be sure to discard objects created with this function using CriWare.CriAtomExOutputPort.Dispose.
- See also
- CriWare.CriAtomExOutputPort.Config, CriWare.CriAtomExOutputPort.Dispose, CriWare.CriAtomExAsrRack.rackId, CriWare.CriAtomExAcf.GetOutputPort, CriWare.CriAtomExPlayer.AddOutputPort, CriWare.CriAtomExPlayer.AddPreferredOutputPort
Calculating the work area size required for the creation of the output port object
- Parameters
-
config | Config structure used to create the output port |
- Returns
- Work area size
- Description:
- Calculate the size of the work area required to create the output port object.
The returned value corresponds to the size of unmanaged memory allocated when calling the constructor of this class.
If the calculation of the work area size fails, this function returns -1.
Please check the error callback message to find out why the work area size calculation failed.
- Note:
- The length of the output port name specified in CriWare.CriAtomExOutputPort.Config.name
must be less than or equal to CriWare.CriAtomExOutputPort.MaxNameLength.
- See also
- CriWare.CriAtomExOutputPort.CriAtomExOutputPort
override void Dispose |
( |
| ) |
|
|
inline |
void SetAsrRackId |
( |
Int32 |
rackId | ) |
|
|
inline |
Specification of ASR Rack ID
- Parameters
-
- Description:
- Specify the ASR Rack as the output port.
A Voice for which an output port is specified will be played via the ASR Rack specified for that output port.
- Note:
- The appropriate ASR Rack must always be specified with this function, both for output port objects created during ACF file registration (CriWare.CriAtomExAcf.GetOutputPort)
or with CriWare.CriAtomExOutputPort.CriAtomExOutputPort. .
There may be restrictions on the ASR Rack that can be specified depending on the type of output port and other factors.
Please refer to the manual for details.
- Note:
- Current playback will not be affected when the ASR rack ID of the output port is changed by this function.
- See also
- CriWare.CriAtomExAsrRack.rackId, CriWare.CriAtomExAcf.GetOutputPort
void SetVibrationChannelLevel |
( |
Int32 |
channel, |
|
|
Single |
level |
|
) |
| |
|
inline |
Setting the channel level of the output port vibration type
- Parameters
-
channel | Channel index (0 = L, 1 = R) |
level | Level (0 ~ 2.0) |
- Description:
- Set the output level to each channel of the output device of vibration type.
- Note:
- The output port of vibration type operates on 2 channels and a -3dB downmix is applied if the final output device is mono.
The value set with this function will be reflected immediately, even while audio is playing.
- See also
- CriWare.CriAtomExOutputPort.SetMonauralMix
void SetMonauralMix |
( |
Boolean |
monauralMix | ) |
|
|
inline |
With/Without monaural downmix for output port of vibration type
- Parameters
-
monauralMix | With monaural mix (CRI_TRUE = Enabled, CRI_FALSE = Disabled) |
- Description:
- The output port of vibration type operates on 2 channels, so if the input data has more than 2 channels,
or 3D pan is set, the output will be transmitted to the left and right of the vibration device.
By enabling monaural mixing, you can eliminate these effects by downmixing to monaural before outputting to the vibration device.
You can also use CriWare.CriAtomExOutputPort.SetVibrationChannelLevel to set the level sent to the vibration device after the monaural mixing.
- Note:
- The value set by this function is immediately reflected, even during the audio playback.
- See also
- CriWare.CriAtomExOutputPort.SetVibrationChannelLevel
Discard the output port object
- Returns
- Whether it can be discarded
- Description:
- Determine whether the output port object can be discarded.
If true is returned, the object can be discarded by calling CriWare.CriAtomExOutputPort.Dispose .
If false is returned, the output port object must first be removed from the player with one of the functions below:
- See also
- CriWare.CriAtomExOutputPort.Dispose
const uint MaxNameLength = 64 |
Whether the output port object is valid
- Returns
- Whether the object is valid
- Description:
- Determine if the output port object is valid.
It basically checks if the native handle held inside the object has been disposed.
- See also
- CriWare.CriAtomExOutputPort.Dispose
The documentation for this class was generated from the following file: