CRI ADX  Last Updated: 2024-07-17 10:48 p
CriAtomAiffPlayerConfigTag结构体 参考

#include <cri_le_atom.h>

成员变量

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

详细描述

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.
注意
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.)
参见
criAtomPlayer_CreateAiffPlayer, criAtomPlayer_SetDefaultConfigForAiffPlayer

结构体成员变量说明

◆ 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.
注意
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.

该结构体的文档由以下文件生成: