Constants
| [Menu] |
Framework type (PS3 PPU)
This is the middleware framework type for PS3 PPU.
ADXM_FRAMEWORK_DEFAULT is the most recommended definition in a certain platform, which can be specified in any platform.
| Define | Remarks |
|---|---|
| ADXM_FRAMEWORK_DEFAULT | same as ADXM_FRAMEWORK_PS3PPU_MULTI_THREAD |
| ADXM_FRAMEWORK_PS3PPU_SINGLE_THREAD | Single thread (main thread only) |
| ADXM_FRAMEWORK_PS3PPU_MULTI_THREAD | Multiple thread |
| [Menu] |
Default priority
Default priority value for each middleware thread.
| Define | Remarks |
|---|---|
| ADXM_PS3PPU_PRIO_VV | Virtual Vsync thread(100) |
| ADXM_PS3PPU_PRIO_VSYNC | Vsync thread(500) |
| ADXM_PS3PPU_PRIO_FS | File streaming thread(600) |
| ADXM_PS3PPU_PRIO_MAIN | Main thread(calling ADXM_SetupFramework functions)(1001) |
| ADXM_PS3PPU_PRIO_IDLE | Idle thread(1500) |
| [Menu] |
Default stack size for thread
Default stack size for creating middleware threads.
| Macros | Value |
|---|---|
| ADXM_PS3PPU_STACK_SIZE | 8192 |
Data Types
| [Menu] |
Thread setup parameter
This is the argument for ADXM_SetupFramework function, to setup parameters for creating middleware threads.
It can be available being specified ADXM_FRAMEWORK_PS3PPU_MULTI_THREAD.
The much lower value means higher priority.
The member of structure are as follows.
| Member | Type | Remarks |
|---|---|---|
| priority_vv | Sint32 | prioroty for virtual Vsync thread |
| priority_vsync | Sint32 | prioroty for Vsync thread |
| priority_fs | Sint32 | prioroty for file streaming thread |
| priority_main | Sint32 | prioroty for main thread |
| priority_idle | Sint32 | prioroty for idle thread |
| [Menu] |
Setup paramaters of sound system
This is the argument for ADXPS3_SetupSound functions, to setup sound configuration parameters of lower library.
Its work buffer size must be calculated by ADXPS3_CalcSoundWorkSize functions,
and then application has to allocate actual work buffer according to its size.
Specifying NULL pointer to mixer_handle, ADX would not output sound data to surround mixer.
The member of structure are as follows.
| Member | Type | Remarks |
|---|---|---|
| mixer_handle | CellAANHandle | handle of surround mixer returned by cellSurMixerGetAANHandle functions. |
| num_output_channels | Sint32 | the number of output channer (max 8), affecting work size and/or decoding load. |
| num_max_voices | Sint32 | the maximu number of voice, which can be created at the same time, affecting work size and/or decoding load.This is invloving the maximum munber of ADX handle implicitly. |
| work | Uint8 * | work buffer pointer, to decoding sound data. |
| work_size | Sint32 | work buffer size, that must be calculated by ADXPS3_CalcSoundWorkSize functions. |
| [Menu] |
setup parameter for PS3 file system
This is the argument for ADXPS3_SetupPs3Fs functions, which is used by ADX file system.
| Member | Type | Remarks |
|---|---|---|
| rtdir | const Char8 * | as root directory from ADX file system. |
Functions
| [Menu] |
Setup CRI middleware framework and start threads
framework:framework type
prm:parameters
None
TRUE:Secceeded, FALSE:Failed
This function sets framework type and creates required middleware threads.
This function must be called before ADXT_Init function.
The pointer for AdxmThreadSprm_PS3PPU structure can be specified to prm.
NULL pointer means default.
The parameters can be available specified ADXM_FRAMEWORK_PS3PPU_MULTI_THREAD.
ADXM_SetupFramework(ADXM_FRAMEWORK_DEFAULT, NULL); : ADXT_Init(); : for (;;) { ADXM_WaitVsync(); ADXM_ExecMain(); : } |
| [Menu] |
Finalize CRI middleware framework and stop threads
None
None
TRUE:Secceeded, FALSE:Failed
This function invalidate framework type and stop creates middleware threads.
This function must be called after ADXT_Finish function.
ADXT_Finish(); : ADXM_ShutdownFramework(); |
| [Menu] |
Calculate work size for sound system
config:Setup paramaters of sound system
None
work size (byte)
This function returns work size for sound system based on Adxps3SoundConfig structure except work_size and work.
cellSurMixerCreate(&sur_mixer_config);
cellSurMixerGetAANHandle(&sur_mixer_handle);
:
Adxps3SoundConfig config;
memset(&config, 0, sizeof(config));
config.mixer_handle = sur_mixer_handle;
config.num_output_channels = NUM_OUTPUT_CHANNELS;
config.num_voices = NUM_MAX_VOICES;
config.work_size = ADXPS3_CalcSoundWorkSize(&config);
config.work = malloc(config.work_size);
ADXPS3_SetupSound(&config);
cellSurMixerStart();
:
ADXT_Init();
|
| [Menu] |
Setup sound system
config:Setup paramaters of sound system
None
TRUE:Succeeded, FALSE:Failed
Setup ADX sound system based on Adxps3SoundConfig structure.
This function must be called before ADXT_Init.
Surround mixer must be stopped calling this function.
cellSurMixerCreate(&sur_mixer_config);
cellSurMixerGetAANHandle(&sur_mixer_handle);
:
Adxps3SoundConfig config;
memset(&config, 0, sizeof(config));
config.mixer_handle = sur_mixer_handle;
config.num_output_channels = NUM_OUTPUT_CHANNELS;
config.num_voices = NUM_MAX_VOICES;
config.work_size = ADXPS3_CalcSoundWorkSize(&config);
config.work = malloc(config.work_size);
ADXPS3_SetupSound(&config);
cellSurMixerStart();
:
ADXT_Init();
|
| [Menu] |
Shutdown sound system
None
None
None
Shutdown ADX sound system.
This function must be called after ADXT_Finish.
ADXT_Finish(); : cellSurMixerPause(CELL_SURMIXER_CONT_PAUSE_ON_IMMEDIATE); : ADXPS3_ShutdownSound(); : cellSurMixerFinalize(); |
| [Menu] |
Nofify callback funciton to input sound data for surround mixer
arg: arguments calling cellSurMixerSetNotifyCallback functions
counter:increment counter of every callback
num_samples:samples that should be generated in its callback
None
0: Succeeded, 1: Failed (Not implemented now)
This is the callback function to notify for sound input.
This must be called by the function registerd by cellSurMixerSetNotifyCallback functions.
ADXPS3_SoundNotifyCallback functions can be set, if application would not output to surround mixer at all.
cellSurMixerCreate(&sur_mixer_config); cellSurMixerSetNotifyCallback(ADXPS3_SoundNotifyCallback, NULL); |
| [Menu] |
Setup PS3 file system
sprm:setup parameter
None
None
This function set PS3 file system to ADX, and set its root directory.
This function must be called before ADXT_Init functions.
NULL argument means default parameters as follows.
| setup parameter | default value |
|---|---|
| root directory | root directory of PS3 file system |
Adxps3SprmPs3Fs sprm; memset(&sprm, 0, sizeof(sprm)); sprm.rtdir = "/data/adx"; ADXPS3_SetupPs3Fs(&sprm); : ADXT_Init(); |
| [Menu] |
Shutdown PS3 file system
None
None
None
This function invalidates PS3 file system to ADX.
This function must be called before ADXT_Finish functions.
ADXT_Finish(); : ADXPS3_ShutdownPs3Fs(); |