#include <cri_le_atom.h>
Raw PCM player creation configuration structure
- Description:
- Structure for specifying the behavior when creating a player capable of raw PCM playback.
This structure is specified as an argument of the criAtomPlayer_CreateRawPcmPlayer 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.
- Attention
- More members will be added in the future. So, when not using the criAtomPlayer_SetDefaultConfigForRawPcmPlayer 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.)
- See also
- criAtomPlayer_CreateRawPcmPlayer, criAtomPlayer_SetDefaultConfigForRawPcmPlayer
◆ pcm_format
PCM data format.
- Description:
- Specifies the PCM data format played by the Atom player.
- Attention
- RawPCM format data other than the specified format cannot be played.
The sound data will be played back as the specified format, regardless of what format the sound data actually is.
◆ max_channels
Maximum number of output channels.
- Description:
- Specifies the number of channels for the sounds played by an Atom player.
Atom player created with the criAtomPlayer_CreateRawPcmPlayer function can play back audio data with number of output channels less than or equal to the number of channels specified with max_channels.
- Attention
- RawPCM format data other than the specified format cannot be played.
The sound data will be played back as the specified format, regardless of what format the sound data actually is.
◆ 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_CreateRawPcmPlayer 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.
- Attention
- Data that is different from the specified sampling rate cannot be played.
The sound data will be played back in the specified sampling rate, regardless of what format the sound data actually is.
◆ 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
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 in an application during 1V, 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_SetDefaultConfigForRawPcmPlayer 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
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: