CRI ADX  Last Updated: 2025-05-07 13:34 p
CriAtomExOutputPort API

Data Structures

struct  CriAtomExOutputPortConfigTag
 Config structure used to create the output port. More...
 

Macros

#define CRIATOMEX_OUTPUT_PORT_MAX_NAME_LENGTH   (64)
 Maximum length of output port name. More...
 
#define criAtomExOutputPort_SetDefaultConfig(p_config, outputport_name)
 Set default values in the configuration structure for creating an output port. More...
 

Typedefs

typedef enum CriAtomExOutputPortTypeTag CriAtomExOutputPortType
 Output port type. More...
 
typedef struct CriAtomExOutputPortConfigTag CriAtomExOutputPortConfig
 Config structure used to create the output port. More...
 
typedef CriAtomExOutputPortObj * CriAtomExOutputPortHn
 Output port handle. More...
 

Enumerations

enum  CriAtomExOutputPortTypeTag { CRIATOMEX_OUTPUT_PORT_TYPE_SOUND = 0 , CRIATOMEX_OUTPUT_PORT_TYPE_VIBRATION , CRIATOMEX_OUTPUT_PORT_TYPE_INVALID = -1 , CRIATOMEX_OUTPUT_PORT_TYPE_ENUM_SIZE_IS_4BYTES = 0x7FFFFFFF }
 Output port type. More...
 

Functions

CriSint32 criAtomExOutputPort_CalculateWorkSize (const CriAtomExOutputPortConfig *config)
 Calculating the work area size for creating the output port handles. More...
 
CriAtomExOutputPortHn criAtomExOutputPort_Create (const CriAtomExOutputPortConfig *config, void *work, CriSint32 work_size)
 Creating an output port handle. More...
 
CriBool criAtomExOutputPort_IsDestroyable (CriAtomExOutputPortHn output_port)
 Discarding the output port handle. More...
 
void criAtomExOutputPort_Destroy (CriAtomExOutputPortHn output_port)
 Destroying an output port handle. More...
 
void criAtomExOutputPort_SetAsrRackId (CriAtomExOutputPortHn output_port, CriAtomExAsrRackId rack_id)
 Specifying the ASR rack ID. More...
 
void criAtomExOutputPort_SetVibrationChannelLevel (CriAtomExOutputPortHn output_port, CriSint32 channel, CriFloat32 level)
 Setting the channel level of the output port vibration type. More...
 
void criAtomExOutputPort_SetMonauralMix (CriAtomExOutputPortHn output_port, CriBool monaural_mix)
 With/Without monaural mix in the output port of vibration type. More...
 
void criAtomExOutputPort_IgnoreCategoryParametersById (CriAtomExOutputPortHn output_port_hn, CriAtomExCategoryId category_id, CriBool ignore_parameters)
 Specifies whether the output port ignores parameters of the specified category. More...
 
void criAtomExOutputPort_ResetIgnoreCategory (CriAtomExOutputPortHn output_port_hn)
 Reset the setting to ignore parameters of the specified category set for the output port. More...
 

Detailed Description

Macro Definition Documentation

◆ CRIATOMEX_OUTPUT_PORT_MAX_NAME_LENGTH

#define CRIATOMEX_OUTPUT_PORT_MAX_NAME_LENGTH   (64)

Maximum length of output port name.

Description:
The maximum length of the string used for the name in CriAtomExOutputPortConfig::name .
See also
CriAtomExOutputPortConfig

◆ criAtomExOutputPort_SetDefaultConfig

#define criAtomExOutputPort_SetDefaultConfig (   p_config,
  outputport_name 
)
Value:
{\
(p_config)->name = outputport_name;\
(p_config)->type = CRIATOMEX_OUTPUT_PORT_TYPE_AUDIO;\
(p_config)->max_ignored_categories = 4;\
}

Set default values in the configuration structure for creating an output port.

Parameters
[in]outputport_nameOutput Port Name
[out]p_configA pointer to the configuration structure for creating an output port
Description:
Set the default values in the configuration structure (CriAtomExOutputPortConfig) set in the criAtomExOutputPort_Create function.
See also
CriAtomExOutputPortConfig, criAtomExOutputPort_Create

Typedef Documentation

◆ CriAtomExOutputPortType

Output port type.

Description:
This value indicates the type of the output port.
See also
CriAtomExOutputPortConfig

◆ CriAtomExOutputPortConfig

Config structure used to create the output port.

Description:
This is the configuration structure used when creating the output port.
It is passed as an argument to the criAtomExOutputPort_Create function.
See also
criAtomExOutputPort_Create

◆ CriAtomExOutputPortHn

typedef CriAtomExOutputPortObj* CriAtomExOutputPortHn

Output port handle.

Description:
CriAtomExOutputPortHn is a handle used to reference an audio output port.

An output port handle can be obtained by one of the two methods below:
Remarks:
An output port is an abstraction for an audio output destination.

If the name of the output destination is specified for an audio track in advance, an output port handle with the same name will be automatically allocated during playback. The output port is associated with an ASR rack. The audio allocated to the output port handle will be played through this ASR rack.
Therefore, before using any output port handle (including the global one), it needs to be associated to the corresponding ASR rack by calling the criAtomExOutputPort_SetAsrRackId function.
See also
criAtomExOutputPort_Create, criAtomExAcf_GetOutputPortHnByName, criAtomExOutputPort_SetAsrRackId

Enumeration Type Documentation

◆ CriAtomExOutputPortTypeTag

Output port type.

Description:
This value indicates the type of the output port.
See also
CriAtomExOutputPortConfig
Enumerator
CRIATOMEX_OUTPUT_PORT_TYPE_SOUND 

Audio type.

Description:
Type of output port used to play normal audio signals.
CRIATOMEX_OUTPUT_PORT_TYPE_VIBRATION 

Vibration type.

Description:
Type of output port used to play vibrations derived from audio signals.
CRIATOMEX_OUTPUT_PORT_TYPE_INVALID 

Vibration Type.

Description:
Invalid type. The return value of the function is used on error.

Function Documentation

◆ criAtomExOutputPort_CalculateWorkSize()

CriSint32 criAtomExOutputPort_CalculateWorkSize ( const CriAtomExOutputPortConfig config)

Calculating the work area size for creating the output port handles.

Parameters
[in]configConfiguration structure used to create output port handles
Returns
CriSint32 Work area size
Return values
0or above Normal processing completed
-1An error occurred
Description:
Calculates the size of the work area needed to create an output port handle.
If no allocator was registered with the criAtomEx_SetUserAllocator macro when creating an output port handle with the criAtomExOutputPort_Create function, it is necessary to pass a memory area of the size returned by this function as a parameter.

If the calculation of the work area size fails, this function returns -1.
For details about the reason why the calculation failed, refer to the error callback messages.
Remarks:
The data passed in the "config" structure is only referenced within this function. Therefore you can free the config area after executing the function.
Attention
The length of the name of the output port specified in CriAtomExOutputPortConfig::name must be less than or equal to CRIATOMEX_OUTPUT_PORT_MAX_NAME_LENGTH .
See also
criAtomExOutputPort_Create

◆ criAtomExOutputPort_Create()

CriAtomExOutputPortHn criAtomExOutputPort_Create ( const CriAtomExOutputPortConfig config,
void *  work,
CriSint32  work_size 
)

Creating an output port handle.

Parameters
[in]configConfiguration structure used for ASR initialization
[in]workWork area
[in]work_sizeWork area size
Returns
CriAtomExOutputPortHn Output port handle
Description:
Creates the output port handle.
The Voice that was assigned a specific output port will be played via the ASR rack associated with that output port.
Remarks:
When the ACF file is registered with the criAtomEx_RegisterAcfFile function, the output port handle set in the ACF file will be automatically created. Therefore, it is not necessary to create a new one with this function.
The output port handle set in the ACF file can be obtained by calling the criAtomExAcf_GetOutputPortHnByName function.
Therefore, calls this function to assign a new output port handle to the application.
The data passed in the "config" structure is only referenced within this function. Therefore you can free the config area after executing the function.
If this function is successful, it returns the output port handle that was created. If it fails, it returns NULL.
Attention
The type of the output port handle created by this function depends on the type specified by CriAtomExOutputPortConfig::type . The following ASR rack IDs are set by default:
  • For CRIATOMEX_OUTPUT_PORT_TYPE_AUDIO : CRIATOMEXASR_RACK_DEFAULT_ID
  • For CRIATOMEX_OUTPUT_PORT_TYPE_VIBRATION : CRIATOMEXASR_RACK_ILLEGAL_ID
    Be sure to set an appropriate ASR rack with the criAtomExOutputPort_SetAsrRackId function before using the output port handle.
See also
criAtomExOutputPort_Destroy, criAtomExAcf_GetOutputPortHnByName, criAtomExPlayer_AddOutputPort, criAtomExPlayer_AddPreferredOutputPort

◆ criAtomExOutputPort_IsDestroyable()

CriBool criAtomExOutputPort_IsDestroyable ( CriAtomExOutputPortHn  output_port)

Discarding the output port handle.

Parameters
[in]output_portOutput port handle
Returns
CriBool Can it be discarded? (CRI_TRUE = possible, CRI_FALSE = not possible)
Description:
出力ポートハンドルの破棄が可能か判定します。
Remarks:
An output port handle that has been added to a player using the criAtomExPlayer_AddOutputPort or criAtomExPlayer_AddPreferredOutputPort function cannot be discarded.
Remove it from the player using the criAtomExPlayer_RemoveOutputPort or criAtomExPlayer_RemovePreferredOutputPort function before discarding it.
Also, output port handles in ACF created from ACF file information cannot be discarded.
See also
criAtomExOutputPort_Destroy

◆ criAtomExOutputPort_Destroy()

void criAtomExOutputPort_Destroy ( CriAtomExOutputPortHn  output_port)

Destroying an output port handle.

Parameters
[in]output_portOutput port handle
Description:
Discards the output port handle.
Remarks:
You can check whether the handle can be destroyed by using the criAtomExOutputPort_IsDestroyable function.
See also
criAtomExOutputPort_Create, criAtomExOutputPort_IsDestroyable

◆ criAtomExOutputPort_SetAsrRackId()

void criAtomExOutputPort_SetAsrRackId ( CriAtomExOutputPortHn  output_port,
CriAtomExAsrRackId  rack_id 
)

Specifying the ASR rack ID.

Parameters
[in]output_portOutput port handle
[in]rack_idASR rack ID
Description:
Specifies the ASR rack in the output port.
The Voice that was assigned a specific output port will be played via the ASR rack associated with that output port.
Remarks:
Uses this function to assign the right ASR rack to the output port handle created when registering the ACF file, or to the output port handle created by the criAtomExOutputPort_Create function.
Depending on the type of the output port, there may be restrictions on the ASR racks that can be specified. For details, refer to the manual.
Attention
Current playback will not be affected when the ASR rack ID of the output port is changed by this function.
See also
criAtomExOutputPort_Create, criAtomExAcf_GetOutputPortHnByName

◆ criAtomExOutputPort_SetVibrationChannelLevel()

void criAtomExOutputPort_SetVibrationChannelLevel ( CriAtomExOutputPortHn  output_port,
CriSint32  channel,
CriFloat32  level 
)

Setting the channel level of the output port vibration type.

Parameters
[in]output_portOutput port handle
[in]channelChannel index (0 = L, 1 = R)
[in]levelLevel (0 ~ 2.0)
Description:
Sets the output level to each channel of the vibration device (when the output port is of the vibration type).
Remarks:
An output port of vibration type operates on 2 channels. If the final output device is monaural, a -3dB downmix is applied. The value set by this function will be reflected immediately even during the audio playback.
See also
criAtomExOutputPort_SetMonauralMix

◆ criAtomExOutputPort_SetMonauralMix()

void criAtomExOutputPort_SetMonauralMix ( CriAtomExOutputPortHn  output_port,
CriBool  monaural_mix 
)

With/Without monaural mix in the output port of vibration type.

Parameters
[in]output_portOutput port handle
[in]monaural_mixWith or without monaural mix (CRI_TRUE = with, CRI_FALSE = without)
Description:
An output port of vibration type operates on 2 channels. If the input Voice is stereo (or has more channels), or if it has 3D panning, the result will be transmitted to the left and right channels of the vibration device. When monaural mix is enabled, this behavior can be overridden by downmixing to monaural before outputting to the vibrating device. You can also use the criAtomExOutputPort_SetVibrationChannelLevel function to set the level sent to the vibration device after a monaural mix.
Remarks:
The value sets by this function will be reflected immediately even during the audio playback.
See also
criAtomExOutputPort_SetVibrationChannelLevel

◆ criAtomExOutputPort_IgnoreCategoryParametersById()

void criAtomExOutputPort_IgnoreCategoryParametersById ( CriAtomExOutputPortHn  output_port_hn,
CriAtomExCategoryId  category_id,
CriBool  ignore_parameters 
)

Specifies whether the output port ignores parameters of the specified category.

Parameters
[in]output_port_hnOutput port handle
[in]category_idCategory ID
[in]ignore_parametersIgnore setting parameter (CRI_TRUE: ignore, CRI_FALSE: do not ignore)
Description:
Specifies whether to ignore the category ID parameter specified for the output port.
Remarks:
You can eliminate the influence of categories by ignoring the category ID parameter specified for the output port. You can also specify the same category ID and change whether or not to ignore a category.
A maximum of four categories can be set. If four categories are set and this function is executed, a warning will occur and no processing will be performed.
Remarks:
This function will reflect the settings during playback.
See also
criAtomExOutputPort_Create, criAtomExAcf_GetOutputPortHnByName

◆ criAtomExOutputPort_ResetIgnoreCategory()

void criAtomExOutputPort_ResetIgnoreCategory ( CriAtomExOutputPortHn  output_port_hn)

Reset the setting to ignore parameters of the specified category set for the output port.

Parameters
[in]output_port_hnOutput port handle
Description:
Resets the setting for ignoring parameters of the specified category set for the output port.
Remarks:
Resets all settings that ignore parameters of the specified category ID for the output port.
The number of categories set is also reset, so you can specify a new category and set the parameters of that category to be ignored.
Remarks:
The settings made by this function are reflected during playback.
See also
criAtomExOutputPort_Create, criAtomExOutputPort_IgnoreCategoryParametersById