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

#include <cri_le_atom.h>

成员变量

CriSint32 max_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 更多...
 

详细描述

ADX player creation configuration structure

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

When a handle to the player is created, as much internal resources as needed are allocated for the player based on the settings specified in the structure.
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. So, when not using the criAtomPlayer_SetDefaultConfigForAdxPlayer macro, make sure to initialize the structure to zero before using it.
(Make sure that no indefinite value is set to any member of the structure.)
参见
criAtomPlayer_CreateAdxPlayer, criAtomPlayer_SetDefaultConfigForAdxPlayer

结构体成员变量说明

◆ max_channels

CriSint32 max_channels
    \brief Maximum number of output channels
    \par Description:
    Specifies the number of channels for the sounds played by an Atom player.<br>
    Atom player created with the ::criAtomPlayer_CreateAdxPlayer function can play back audio data with number of 
    output channels less than or equal to the number of channels specified with max_channels.<br>
    The relationship between the value specified as the maximum number of output channels and the data that can be played back with the created Atom 
    player is shown below.<br>
Relationship between maximum number of output channels and the data that can be played back
maximum number of output channels (specified value)| data that can be played with the created Atom player
1 Mono
2 Mono, Stereo
6 Mono, Stereo, 5.1ch
8 Mono, Stereo, 5.1ch, 7.1ch


Remarks:
On platform using hardware resource during sound output, use of hardware resource can be suppressed by reducing the number of output channels.
注意
You cannot play back data exceeding the specified maximum number of output channels.
For example, if the maximum number of output channels is set to 1, stereo audio cannot be played with the created Atom player.
(It is not down mixed to monophonic output.)

◆ max_sampling_rate

CriSint32 max_sampling_rate

Maximum sampling rate

Description:
Specifies the sampling rate of the sounds played by an Atom player.
Atom player created with the criAtomPlayer_CreateAdxPlayer function can play back audio data with sampling rate less than or equal to the value specified with max_sampling_rate.

Remarks:
The size of work memory necessary to create the Atom player can be reduced by reducing the maximum sampling rate.
注意
You cannot play back data exceeding the specified maximum sampling rate.
For example, if the maximum sampling rate is set to 24000, 48000Hz audio cannot be played with the created Atom player.
(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 address specified with the criAtomPlayer_SetData function). (Playback from file is not possible.)
If streaming_flag is set to CRI_TRUE, the created Atom player will support on-memory data playback and playback from file (playback of file specified with the criAtomPlayer_SetFile function or criAtomPlayer_SetContentId function.
Supplement:
If streaming_flag is set to CRI_TRUE, resource for reading file is allocated when creating Atom player.
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.
If you specify CRIATOM_SOUND_RENDERER_DEFAULT as sound_renderer_type, audio data is sent to the default sound renderer.
If you specify CRIATOM_SOUND_RENDERER_NATIVE as sound_renderer_type, audio data is sent to sound output of each default platform.
If you specify CRIATOM_SOUND_RENDERER_ASR as sound_renderer_type, audio data is sent to ASR (Atom Sound Renderer).
(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 least amount of latency when audio playback is started.
(During on-memory playback, sound output is started after executing the criAtomPlayer_Start function by 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 if 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 environment.
However, in environment such as portable game machines 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 actually 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.

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