CRI ADX  Last Updated: 2024-07-17 10:47 p
CriAtomDbas API

Data Structures

struct  CriAtomDbasConfigTag
 D-BAS creation parameter structure. More...
 

Macros

#define CRIATOMDBAS_ILLEGAL_ID   (-1)
 Atom D-BAS ID. More...
 
#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS   (4)
 Default number of guaranteed buffers for creating D-BAS. More...
 
#define CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS   (2)
 Minimum number of guaranteed buffers that can be specified for creating D-BAS. More...
 
#define criAtomDbas_SetDefaultConfig(p_config)
 Set default parameters for CriAtomDbasConfig. More...
 

Typedefs

typedef CriSint32 CriAtomDbasId
 Atom D-BAS ID. More...
 
typedef struct CriAtomDbasConfigTag CriAtomDbasConfig
 D-BAS creation parameter structure. More...
 

Functions

CriSint32 criAtomDbas_CalculateWorkSize (const CriAtomDbasConfig *config)
 Calculate work area size for creating D-BAS. More...
 
CriAtomDbasId criAtomDbas_Create (const CriAtomDbasConfig *config, void *work, CriSint32 work_size)
 Create D-BAS. More...
 
void criAtomDbas_Destroy (CriAtomDbasId atom_dbas_id)
 Destroy D-BAS. More...
 
CriSint32 criAtomDbas_GetStreamingPlayerHandles (CriAtomDbasId dbas_id, CriAtomPlayerHn *players, CriSint32 length)
 Get Atom player handle in streaming playback. More...
 

Detailed Description

Macro Definition Documentation

◆ CRIATOMDBAS_ILLEGAL_ID

#define CRIATOMDBAS_ILLEGAL_ID   (-1)

Atom D-BAS ID.

Description:
Value returned when the criAtomDbas_Create function fails.
See also
criAtomDbas_Create, criAtomDbas_Destroy

◆ CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS

#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS   (4)

Default number of guaranteed buffers for creating D-BAS.

Description:
Default number of guaranteed buffers for creating D-BAS. A safe value is set so that streaming is played without interruption even for sound data with extremely little data at the beginning and end of the loop.
See also
criAtomDbas_Create, criAtomDbas_CalculateWorkSize

◆ CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS

#define CRIATOMDBAS_MINIMUM_NUM_SECUREMENT_BUFFERS   (2)

Minimum number of guaranteed buffers that can be specified for creating D-BAS.

Description:
Minimum number of guaranteed buffers that can be specified for creating D-BAS. For streaming playback without interruption, at least two buffers are required (double buffering). Therefore, this value cannot be smaller than 2.
See also
criAtomDbas_Create, criAtomDbas_CalculateWorkSize

◆ criAtomDbas_SetDefaultConfig

#define criAtomDbas_SetDefaultConfig (   p_config)
Value:
{\
(p_config)->identifier = 0;\
(p_config)->max_streams = CRIATOM_DEFAULT_DBAS_MAX_STREAMS;\
(p_config)->max_bps = CRIATOM_DEFAULT_DBAS_MAX_BPS;\
(p_config)->max_mana_streams = 0;\
(p_config)->max_mana_bps = 0;\
(p_config)->num_securement_buffers = CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS;\
}
#define CRIATOM_DEFAULT_DBAS_MAX_BPS
Default initialization maximum bit rate for creating D-BAS.
Definition: cri_le_atom.h:114
#define CRIATOMDBAS_DEFAULT_NUM_SECUREMENT_BUFFERS
Default number of guaranteed buffers for creating D-BAS.
Definition: cri_le_atom.h:128

Set default parameters for CriAtomDbasConfig.

Parameters
[in]p_configpointer to the configuration structure for creating D-BAS
Description:
Sets default values for the configuration structure ( CriAtomDbasConfig ) that is set for the criAtomDbas_Create function.
See also
CriAtomDbasConfig, criAtomDbas_Create, criAtomDbas_CalculateWorkSize

Typedef Documentation

◆ CriAtomDbasId

typedef CriSint32 CriAtomDbasId

Atom D-BAS ID.

Description:
ID for managing D-BAS.
The ID can be acquired by creating D-BAS using the criAtomDbas_Create function.
Applications use this D-BAS ID only for destroying D-BAS.
See also
criAtomDbas_Create, criAtomDbas_Destroy

◆ CriAtomDbasConfig

D-BAS creation parameter structure.

Description:
D-BAS creation parameter structure specified as argument of the criAtomDbas_Create function.

Attention
More members will be added in the future. So, when not using the criAtomDbas_SetDefaultConfig 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
criAtomDbas_Create, criAtomDbas_CalculateWorkSize, criAtomDbas_SetDefaultConfig

Function Documentation

◆ criAtomDbas_CalculateWorkSize()

CriSint32 criAtomDbas_CalculateWorkSize ( const CriAtomDbasConfig config)

Calculate work area size for creating D-BAS.

Parameters
[in]configpointer to the configuration structure for creating D-BAS
[out]CriSint32work area size for creating D-BAS
Return values
>=0 successfully completed
-1error occurred
Description:
Calculates the work area size required for creating a D-BAS based on the D-BAS creation parameters.

If work area size calculation fails, this function returns -1.
The reason for work area size calculation failure can be determined by viewing the error callback message.
Attention
You must initialize the library before executing this function.

Depending on the setting, D-BAS may required 2GB or greater work size
in which case an error occurs and -1 is returned.
If an error occurs, reduce the value of max_streams or max_bps.
See also
criAtomDbas_Create

◆ criAtomDbas_Create()

CriAtomDbasId criAtomDbas_Create ( const CriAtomDbasConfig config,
void *  work,
CriSint32  work_size 
)

Create D-BAS.

Parameters
[in]configpointer to the configuration structure for creating D-BAS.
[in]workpointer to the work area for creating D-BAS
[in]work_sizework area size used for creating D-BAS
Returns
CriAtomDbasId D-BAS management ID
Description:
Creates a D-BAS based on the D-BAS creation parameters.
When the function creates D-BAS successfully, it registers the D-BAS to the library and returns a valid management ID.
If the creation of the D-BAS fails, this function returns CRIATOMDBAS_ILLEGAL_ID .
(The cause of the error will be returned in the error callback.)

The obtained ID is used in the criAtomDbas_Destroy function.
Attention
The library must be initialized before this function is executed.
See also
criAtomDbas_CalculateWorkSize, criAtomDbas_Destroy

◆ criAtomDbas_Destroy()

void criAtomDbas_Destroy ( CriAtomDbasId  atom_dbas_id)

Destroy D-BAS.

Parameters
[in]atom_dbas_idD-BAS management ID
Description:
Destroys D-BAS specified by the management ID obtained with the criAtomDbas_Create function.
See also
criAtomDbas_Create

◆ criAtomDbas_GetStreamingPlayerHandles()

CriSint32 criAtomDbas_GetStreamingPlayerHandles ( CriAtomDbasId  dbas_id,
CriAtomPlayerHn players,
CriSint32  length 
)

Get Atom player handle in streaming playback.

Parameters
[in]dbas_idD-BAS management ID
[out]playersarray for recieving player handles
[in]lengthnumber of elements for the above array
Returns
CriSint32 number of players
Return values
>=0 successfully completed
-1error occurred
Description:
Gets an Atom player handle that is in streaming playback.
If successfully getting a player handle, the address of the player handle is stored in the third argument (the players array), and the number of player handles is returned as a return value.
Remarks:
By specifying NULL for the third argument (the players array) and 0 for the fourth argument (the length), only the number of players that are playing stream can be returned.
Attention
If you want to obtain the handle after obtaining the number of players, you must use the criAtom_Lock function for exclusive control to prevent server processing from interrupting between obtaining the number of players and obtaining the handle.
(The number of players may change depending on the timing of server processing.)

If the number of elements is less than the number of players in streaming, this function returns an error value (-1).