CRI ADX  Last Updated: 2024-07-17 10:47 p
CriAtomAiffPlayerConfigTag Struct Reference

#include <cri_le_atom.h>

Data Fields

CriSint32 max_channels
 Maximum number of output channels. More...
 
CriSint32 max_sampling_rate
 Maximum sampling rate. More...
 
CriBool streaming_flag
 Whether to perform streaming playback. More...
 
CriAtomSoundRendererType sound_renderer_type
 Sound renderer type. More...
 
CriSint32 decode_latency
 Decoder process latency. More...
 
void * context
 Pointer to platform-specific parameters. More...
 

Detailed Description

Configuration structure for AIFF player creation

Description:
Structure for specifying the behavior when creating a player capable of AIFF playback.
This structure is specified as an argument of the criAtomPlayer_CreateAiffPlayer function.

As much internal resources as needed are allocated for the player depending on the settings specified in the structure when a handle to the player is created.
The size of the work area needed for the player varies depending on the parameters specified in the structure.
Attention
More members will be added in the future. When not using the ::criAtomPlayer_SetDefaultConfigForAiffPlayer macro, make sure to initialize the structure to zero before use.
(Make sure that no indefinite value is set to any member of the structure.)
See also
criAtomPlayer_CreateAiffPlayer, criAtomPlayer_SetDefaultConfigForAiffPlayer

Field Documentation

◆ max_channels

CriSint32 max_channels

Maximum number of output channels.

Description:
Specifies the number of channels of the sound played by an Atom player.
An Atom player created with the criAtomPlayer_CreateAiffPlayer function can play back audio data with up to the number of channels specified for max_channels.

◆ max_sampling_rate

CriSint32 max_sampling_rate

Maximum sampling rate.

Description:
Specifies the sampling rate of the sound played by an Atom player.
An Atom player created with the criAtomPlayer_CreateAiffPlayer function can play back audio data with a sampling rate up to that specified for max_sampling_rate.

Remarks:
The size of work memory necessary to create the Atom player can be reduced by decreasing the maximum sampling rate.
Attention
Any data that exceeds the specified maximum sampling rate will not be played.
For example, a 48,000 Hz sound cannot be played by an Atom player that was created with a maximum sampling rate of 24000.
(It is not down sampled and output.)

◆ streaming_flag

CriBool streaming_flag

Whether to perform streaming playback.

Description:
Specifies whether to perform streaming playback (playback from file) with Atom player.
If streaming_flag is set to CRI_FALSE, the created Atom player will support only on-memory data playback (playback of memory addresses specified with the criAtomPlayer_SetData function. (Playback from a file is not possible.)
If streaming_flag is set to CRI_TRUE, the created Atom player supports both on-memory data playback and playback from a file (playback of a file specified by the criAtomPlayer_SetFile or criAtomPlayer_SetContentId functions).
Supplement:
If streaming_flag is set to CRI_TRUE, resources for loading files are allocated when the Atom player is created.
Therefore, compared to when the streaming_flag is set to CRI_FALSE, more memory is required to create the Atom player.

◆ sound_renderer_type

CriAtomSoundRendererType sound_renderer_type

Sound renderer type.

Description:
Specifies the type of sound renderer used by an Atom player.
When CRIATOM_SOUND_RENDERER_DEFAULT is specified as the sound_renderer_type, audio data is transferred to the default sound renderer.
When CRIATOM_SOUND_RENDERER_NATIVE is specified as the sound_renderer_type, audio data is transferred to the default sound output of each platform.
When CRIATOM_SOUND_RENDERER_ASR is specified as the sound_renderer_type, audio data is transferred to the ASR (Atom Sound Renderer).
(The ASR output destination is specified during ASR initialization.)

◆ decode_latency

CriSint32 decode_latency

Decoder process latency.

Description:
Specifies the decoder process latency.
When decode_latency is set to 0, the player will decode audio data with the least amount of latency when audio playback is started.
(During on-memory playback, sound output is started after executing the criAtomPlayer_Start function and decoding the amount of data necessary to start playback in the first server process.)
On the other hand, if decode_latency is set to 1, the amount of data necessary to start playback is divided among several server processes.
(Even for on-memory playback, sound output is not started after executing the criAtomPlayer_Start function until the number of server processes specified by decode_latency is executed).
Remarks:
The Atom player determines the amount of sound data to decode per server process based on the data remaining in the sound buffer.
Since the sound buffer is empty before starting sound playback, more data is decoded than during sound playback (around 2 to 4 times).
Since the sound data decode process load per player is small, the processing load when starting to output each sound is not likely to be a problem.
However, if large amount of sound output requests are made simultaneously to 1V in an application, the peak processing load of all players will be synchronized and the load may increase significantly.
When performing such control, local increase in processing load can be avoided by increasing the value of decode_latency.

The default value of decode_latency is set to 0 in most environments.
However, in environments such as portable game devices where even a small change in load may have great effect on the application, the default value may be set to 1 or greater.
(Refer to the result of applying the criAtomPlayer_SetDefaultConfigForAdxPlayer function for the actual set value.)

Currently, decode_latency cannot be set to 4 or greater.
(If decode_latency is set to 4 or greater, it is changed to 3 within the library.)

◆ context

void* context

Pointer to platform-specific parameters.

Description:
Specifies a pointer to a platform-specific parameter. If NULL is specified, the player will be created with the default parameters for each platform.
The parameter structure is defined in each platform-specific header. Always specify NULL on platforms where no parameter structure is defined.

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