CRI Middleware Library Reference Manual : ADXCS

Constants

[Menu]

ADXCS_STAT_~
Playback States

Description

Indicates ADXCS handle playback state.

The playback state can be retrieved using the ADXCS_GetStat function.

Define | Remarks
--- | ---
ADXCS_STAT_STOP | Stopped
ADXCS_STAT_PREP | Preparing for playback
ADXCS_STAT_PLAYING | Decoding and playing back
ADXCS_STAT_PLAYEND | Playback finished
ADXCS_STAT_ERROR | An error occurred

[Menu]

ADXCS_FADE_STAT_~
Fader States

Description

Indicates ADXCS handle fader state.

The fader state can be retrieved using the ADXCS_GetFadeStat function.

Define | Remarks
--- | ---
ADXCS_FADE_STAT_IDLE | Not performing fading
ADXCS_FADE_STAT_FADING | Performing fading

[Menu]

ADXCS_SND_TYPE_~
Sound Types

Description

Indicates the type of sound for an ADXCS handle.

Define | Remarks
--- | ---
ADXCS_SND_TYPE_SOUNDEFFECT | Sound Effects
ADXCS_SND_TYPE_MUSIC | Music
ADXCS_SND_TYPE_VOICE | Speech
ADXCS_SND_TYPE_NONE | Not specified

Remarks

If nothing is set when creating a handle, the sound type ADXCS_SND_TYPE_NONE is used.

[Menu]

ADXCS_CB_~
Callback Function Types

Description

Indicates the callback function type.

These constants are passed as parameters when calling the callback function that was registered using the ADXCS_SetCbFunc function.

Define | Remarks
--- | ---
ADXCS_CB_START_FADE_OUT | Fade out started
ADXCS_CB_START_FADE_IN | Fade in started
ADXCS_CB_START_VOL_CHANGE | Volume change started
ADXCS_CB_END_FADE_OUT | Fade out finished
ADXCS_CB_END_FADE_IN | Fade in finished
ADXCS_CB_END_VOL_CHANGE | Volume change finished
ADXCS_CB_END_FADE_ALL | All fading finished

Data Types

[Menu]

ADXCS
ADXCS Handle

Description Handle for controlling ADXCS playback. These handles are created using the ADXCS_Create function.

[Menu]

AdxcsCrePrm
Handle Creation Parameter Structure

Description

Structure that contains settings needed for creating an ADXCS handle.

When using this structure, first initialize the structure to zero, then set the required members.

The members of the structure are as follows:

Member | Type | Description
--- | --- | ---
max_stm | Sint32 | Maximum number of streams played back simultaneously
max_ch | Sint32 | Maximum number of channels
max_sfreq | Sint32 | Maximum sampling frequency
max_aix_track | Sint32 | Maximum number of AIX tracks
play_method | Sint32 | Playback method
sound_type | Sint8 | Sound type (ADXCS_SND_TYPE_~)
use_crossfade | Bool | Whether or not to perform crossfading
use_aix | Bool | Whether or not to use AIX
use_ahx | Bool | Whether or not to use AHX

Remarks

(1)The max_stm, max_ch, max_sfreq and play_method members have the same meanings as the values passed to the macro for calculating the ADX working area size.

(2)The max_aix_track member has the same meaning as the value passed to the macro for calculating the AIX working area size.

Functions

[Menu]

ADXCS_Init
Initialize ADXCS library

Format
void ADXCS_Init(void)
Input

None

Output

None

Return Value

None

Description

Performs ADXCS library initialization.

Remarks

To reinitialize the library, call the ADXCS_Finish function before initializing again.

[Menu]

ADXCS_Finish
Finalize ADXCS library

Format
void ADXCS_Finish(void)
Input

None

Output

None

Return Value

None

Description

Performs ADXCS library finalization.

[Menu]

ADXCS_Create
Create ADXCS handle

Format
ADXCS ADXCS_Create(const AdxcsCrePrm *cprm, Sint8 *work, Sint32 work_size)
Input

cprm: Pointer to the handle creation parameter structure

work: Pointer to the working area

work_size: Working area size (in bytes)

Output

None

Return Value

ADXCS handle (NULL is returned if handle creation fails)

Description

Creates an ADXCS handle according to the specified parameters. Calculate the size of the working area using the ADXCS_CalcWorkCprm function.

In addition, be sure to initialize the handle creation parameter structure to zero before setting the required member values.

Example

    /* Configure handle creation parameter structure */
    memset(&cprm, 0, sizeof(cprm));
    cprm.max_stm     = 1;                    /* Maximum number of streams played back simultaneously: 1 */
    cprm.max_nch     = 2;                    /* Stereo                           */
    cprm.max_sfreq   = 48000;                /* 48kHz                            */
    cprm.play_method = ADXT_PLY_STM;         /* Playback method: stream playback */
    work_size = ADXCS_CalcWorkCprm(&cprm);   /* Calculate working area size      */
    work = (Sint8 *)malloc(work_size);       /* Allocate working area            */
    /* Create ADXCS handle */
    adxcs = ADXCS_Create(&cprm, work, work_size);

[Menu]

ADXCS_Destroy
Destroy ADXCS handle

Format
void ADXCS_Destroy(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

None

Description

Destroys an ADXCS handle that was previously created using the

ADXCS_Create function.

[Menu]

ADXCS_CalcWorkCprm
Calculates working area size

Format
Sint32 ADXCS_CalcWorkCprm(const AdxcsCrePrm *cprm)
Input

cprm: Pointer to handle creation parameter structure

Output

None

Return Value

Working area size (in bytes)

Description

Calculates the size of the working area needed by ADXCS from the handle creation parameter structure.

The working area size calculated from this function should be passed to the ADXCS_Create function.

Example

    /* Configure handle creation parameter structure */
    memset(&cprm, 0, sizeof(cprm));
    cprm.max_stm     = 1;                    /* Maximum number of streams played back simultaneously: 1 */
    cprm.max_nch     = 2;                    /* Stereo                           */
    cprm.max_sfreq   = 48000;                /* 48kHz                            */
    cprm.play_method = ADXT_PLY_STM;         /* Playback method: stream playback */
    work_size = ADXCS_CalcWorkCprm(&cprm);   /* Calculate working area size      */
    work = (Sint8 *)malloc(work_size);       /* Allocate working area            */
    /* Create ADXCS handle */
    adxcs = ADXCS_Create(&cprm, work, work_size);

[Menu]

ADXCS_AttachAhx
Attach AHX playback functionality

Format
void ADXCS_AttachAhx(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

None

Description

Attaches AHX playback functionality to an ADXCS handle. When this function is executed, the ability to playback AHX audio data is added to the specified ADXCS handle.

Remarks

The use_ahx member of the handle creation parameter structure must be set to TRUE when creating the handle.

Example

    /* Configure handle creation parameter structure */
    memset(&cprm, 0, sizeof(cprm));
    cprm.max_stm     = 1;                    /* Maximum number of streams played back simultaneously: 1 */
    cprm.max_nch     = 1;                    /* Mono                             */
    cprm.max_sfreq   = 24000;                /* 24kHz                            */
    cprm.play_method = ADXT_PLY_STM;         /* Playback method: stream playback */
    cprm.use_ahx     = TRUE;                 /* Use AHX                          */
    work_size = ADXCS_CalcWorkCprm(&cprm);   /* Calculate the working area size  */
    work = (Sint8 *)malloc(work_size);       /* Allocate the working area        */
    /* Create ADXCS handle */
    adxcs = ADXCS_Create(&cprm, work, work_size);
    /* Attach AHX playback functionality */
    ADXCS_AttachAhx(adxcs);

[Menu]

ADXCS_DetachAhx
Detach AHX playback functionality

Format
void ADXCS_DetachAhx(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

None

Description

Detaches AHX playback functionality from an ADXCS handle. When this function is executed, the ability to playback AHX audio data is removed from the specified ADXCS handle.

Remarks

The use_ahx member of the handle creation parameter structure must be set to TRUE when creating the handle.

[Menu]

ADXCS_StartFname
Start playback (playback from file)

Format
void ADXCS_StartFname(ADXCS adxcs, Char8 *fname)
Input

adxcs: ADXCS handle

fname: Name of file to playback

Output

None

Return Value

None

Description

Starts playback of the specified file.

Remarks

(1)Fade in is performed as playback begins. Fade in is performed according to parameter settings.

(2)If the use_crossfade member of the handle creation parameter structure is set to TRUE when the handle is created, crossfading can be performed during audio playback.

(3)When voice highlight is enabled and this function is used to playback speech, the volume of music being played by other handles is automatically reduced.

[Menu]

ADXCS_StartAfs
Start playback by FID

Format
void ADXCS_StartAfs(ADXCS adxcs, Sint32 patid, Sint32 fid)
Input

adxcs: ADXCS handle

patid: Partition ID

fid: File ID

Output

None

Return Value

None

Description

Starts playback of an inside file from within an AFS file using the specified partition and file IDs.

Remarks

Details related to fade in, crossfade and voice highlight functionality are the same as for the ADXCS_StartFname function.

[Menu]

ADXCS_StartMem
Start playback by memory address

Format
void ADXCS_StartMem(ADXCS adxcs, void *dat, Sint32 datlen)
Input

adxcs: ADXCS handle

dat: Pointer to data in memory

datlen: Data length

Output

None

Return Value

None

Description

Starts playback of data from memory.

Remarks

Details related to fade in, crossfade and voice highlight functionality are the same as for the ADXCS_StartFname function.

[Menu]

ADXCS_StartMemIdx
Starts playback by memory index

Format
void ADXCS_StartMemIdx(ADXCS adxcs, void *acx, Sint32 no)
Input

adxcs: ADXCS handle

acx: Pointer to ACX data in memory

no: Index number of audio to playback

Output

None

Return Value

None

Description

Starts playback from ACX data in memory. The index specifies the audio data within the ACX data.

Remarks

(1)Details related to fade in, crossfade and voice highlight functionality are the same as for the ADXCS_StartFname function.

(2)This function cannot be used with handles created with the use_aix member of the handle creation parameter structure set to TRUE.

[Menu]

ADXCS_Stop
Stop playback

Format
void ADXCS_Stop(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

None

Description

Stops playback.

Remarks

Fade out is performed according to parameter settings.

[Menu]

ADXCS_Pause
Pause / cancel pause

Format
void ADXCS_Pause(ADXCS adxcs, Sint32 sw)
Input

adxcs: ADXCS handle

sw: Switch flag (ON: set pause, OFF: cancel pause)

Output

None

Return Value

None

Description

Pauses or resumes playback.

Remarks

Fade in and fade out are not performed when pausing or canceling pause.

[Menu]

ADXCS_GetStatPause
Get pause state

Format
Sint32 ADXCS_GetStatPause(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

ON = paused, OFF = not paused

Description

Gets the pause state.

[Menu]

ADXCS_GetStat
Get playback state

Format
Sint32 ADXCS_GetStat(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

ADXCS handle state (ADXCS_STAT_~)

Description

Gets the playback state of a handle.

Handles can be in the following playback states.

Define | Remarks
--- | ---
ADXCS_STAT_STOP | Stopped
ADXCS_STAT_PREP | Preparing for playback
ADXCS_STAT_PLAYING | Decoding and playing back
ADXCS_STAT_PLAYEND | Playback finished
ADXCS_STAT_ERROR | An error occurred

[Menu]

ADXCS_GetCprm
Get handle creation parameters

Format
const AdxcsCrePrm *ADXCS_GetCprm(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Pointer to a handle creation parameter structure

Description

Gets the handle creation parameters for the specified ADXCS handle.

[Menu]

ADXCS_SetLpFlg
Set loop flag

Format
void ADXCS_SetLpFlg(ADXCS adxcs, Sint32 flg)
Input

adxcs: ADXCS handle

flg: Loop flag (ON: loop, OFF: don't loop)

Output

None

Return Value

None

Description

Sets the loop flag.

Remarks

The ADXT_SetLpFlg and AIXP_SetLpSw functions have the same meaning.

[Menu]

ADXCS_SetType
Set sound type

Format
void ADXCS_SetType(ADXCS adxcs, Sint32 type)
Input

adxcs: ADXCS handle

type: Sound type (ADXCS_SND_TYPE_~)

Output

None

Return Value

None

Description

Sets the sound type.

Sound types are listed below.

Define | Remarks
--- | ---
ADXCS_SND_TYPE_SOUNDEFFECT | Sound Effects
ADXCS_SND_TYPE_MUSIC | Music
ADXCS_SND_TYPE_VOICE | Speech
ADXCS_SND_TYPE_NONE | Not specified

[Menu]

ADXCS_GetType
Get sound type

Format
Sint32 ADXCS_GetType(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Sound type (ADXCS_SND_TYPE_~)

Description

Gets the sound type.

[Menu]

ADXCS_SetOutVol
Set output volume

Format
void ADXCS_SetOutVol(ADXCS adxcs, Sint32 vol)
Input

adxcs: ADXCS handle

vol: Baseline output volume (0: 0[dB]to -960: -96.0[dB])

Output

None

Return Value

None

Description

Sets the baseline output volume. The baseline output volume is the standard volume used except during increases and decreases due to fader and voice highlight functions.

Remarks

The actual output volume varies depending on the state of fader and voice highlight functionality.

[Menu]

ADXCS_GetOutVol
Get output volume

Format
Sint32 ADXCS_GetOutVol(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Baseline output volume (0: 0[dB]to -960: -96.0[dB])

Description

Gets the baseline output volume.

Remarks

This does not include increases or decreases due to the fader or voice highlighting.

To get the actual output volume, retrieve the ADXT handle and call the ADXT_GetOutVol function.

[Menu]

ADXCS_SetTrackVol
Set individual track output volume

Format
void ADXCS_SetTrackVol(ADXCS adxcs, Sint32 trno, Sint32 vol)
Input

adxcs: ADXCS handle

trno: Track number

vol: Baseline output volume (0: 0[dB]to -960: -96.0[dB])

Output

None

Return Value

None

Description

Sets the baseline output volume of an individual AIX track.

Remarks

This function sets the baseline output volume. The actual output volume varies depending on the state of fader and voice highlight functionality.

[Menu]

ADXCS_GetTrackVol
Get individual track output volume

Format
Sint32 ADXCS_GetTrackVol(ADXCS adxcs, Sint32 trno)
Input

adxcs: ADXCS handle

trno: Track number

Output

None

Return Value

The baseline output volume of the specified track (0: 0[dB]to -960: -96.0[dB])

Description

Gets the baseline output volume of an individual track.

Remarks

This does not include increases or decreases due to the fader or voice highlighting.

To get the actual output volume, retrieve the internal AIXP handle and use this to get the output volume.

[Menu]

ADXCS_SetFadeOutTime
Set fade out time

Format
void ADXCS_SetFadeOutTime(ADXCS adxcs, Sint32 time)
Input

adxcs: ADXCS handle

time: Fade out time (in units of Vsync)

Output

None

Return Value

None

Description

Sets the fade out time.

Remarks

Setting the time parameter to 60 gives a fade out time of approximately 1 second.

The default value is 30.

[Menu]

ADXCS_GetFadeOutTime
Get fade out time

Format
Sint32 ADXCS_GetFadeOutTime(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Fade out time (in units of Vsync)

Description

Gets the fade out time.

[Menu]

ADXCS_SetFadeInTime
Set fade in time

Format
void ADXCS_SetFadeInTime(ADXCS adxcs, Sint32 time)
Input

adxcs: ADXCS handle

time: Fade in time (in units of Vsync)

Output

None

Return Value

None

Description

Sets the fade in time.

Remarks

Setting the time parameter to 60 gives a fade in time of approximately 1 second.

The default value is 0 (playback starts with no fade in).

[Menu]

ADXCS_GetFadeInTime
Get fade in time

Format
Sint32 ADXCS_GetFadeInTime(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Fade in time (in units of Vsync)

Description

Gets the fade in time.

[Menu]

ADXCS_SetVolChangeTime
Set volume change time

Format
void ADXCS_SetVolChangeTime(ADXCS adxcs, Sint32 time)
Input

adxcs: ADXCS handle

time: Volume change time (in units of Vsync)

Output

None

Return Value

None

Description

Sets the volume change time.

Remarks

Setting the time parameter to 60 gives a volume change time of approximately 1 second.

The default value is 0 (volume changes instantly).

[Menu]

ADXCS_GetVolChangeTime
Get volume change time

Format
Sint32 ADXCS_GetVolChangeTime(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Volume change time (in units of Vsync)

Description

Gets the volume change time.

[Menu]

ADXCS_SetFadeInStartOffset
Set fade in start offset

Format
void ADXCS_SetFadeInStartOffset(ADXCS adxcs, Sint32 offset)
Input

adxcs: ADXCS handle

offset: The time offset between the start of fade out and the start of fade in

(in units of Vsync)

Output

None

Return Value

None

Description

Sets the time offset from the start of fade out to the start of fade in when performing crossfading. If a negative value is specified, fade in starts before fade out.

Remarks

The default value is 0 (fade in and fade out start simultaneously).

[Menu]

ADXCS_GetFadeInStartOffset
Get fade in start offset

Format
Sint32 ADXCS_GetFadeInStartOffset(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The time offset between the start of fade out and the start of fade in (in units of Vsync)

Description

Gets the time offset from the start of fade out to the start of fade in when performing crossfading.

[Menu]

ADXCS_SetFadeEndDelay
Set time delay after fade

Format
void ADXCS_SetFadeEndDelay(ADXCS adxcs, Sint32 delay)
Input

adxcs: ADXCS handle

delay: Time delay after fade (in units of Vsync)

Output

None

Return Value

None

Description

Sets the time delay after fade.

Remarks

(1)The default value is 60.

(2)Playback is stopped, the fader state is changed and the callback function is called only once the delay time has elapsed after fading has finished.

(3)Configure this setting when there is some delay introduced by the sound driver or hardware into the time between setting the volume and when the change actually takes effect.

[Menu]

ADXCS_GetFadeEndDelay
Get time delay after fade

Format
Sint32 ADXCS_GetFadeEndDelay(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Time delay after fade (in units of Vsync)

Description

Gets the time delay after fade.

[Menu]

ADXCS_GetActiveAdxt
Get active ADXT handle

Format
ADXT ADXCS_GetActiveAdxt(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The active ADXT handle

Description

Gets the active ADXT handle.

Remarks

(1)When the use_aix member of the handle creation parameter structure is set to TRUE, the return value is always NULL because AIXP handles are used for playback. Use the ADXCS_GetActiveAixp function to retrieve the required AIXP handle.

(2)The same handle is always returned if the use_crossfade member of the handle creation parameter structure is FALSE.

[Menu]

ADXCS_GetNextAdxt
Get next ADXT handle

Format
ADXT ADXCS_GetNextAdxt(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The next ADXT handle

Description

Gets the next ADXT handle.

Remarks

(1)When the use_aix member of the handle creation parameter structure is set to TRUE, the return value is always NULL because AIXP handles are used for playback. Use the ADXCS_GetNextAixp function to retrieve the required AIXP handle.

(2)The same handle is always returned if the use_crossfade member of the handle creation parameter structure is FALSE.

[Menu]

ADXCS_GetAdxt
Get ADXT handle by index

Format
ADXT ADXCS_GetAdxt(ADXCS adxcs, Sint32 index)
Input

adxcs: ADXCS handle

index: ADXT handle index number (0 or 1)

Output

None

Return Value

The ADXT handle for the specified index number

Description

Gets the ADXT handle for the specified index number.

Remarks

(1)When the use_aix member of the handle creation parameter structure is set to TRUE, the return value is always NULL because AIXP handles are used for playback. Use the ADXCS_GetAixp function to retrieve the required AIXP handle.

(2)When the use_crossfade member of the handle creation parameter structure is set to TRUE, two ADXT handles are stored internally for each ADXCS handle. The index number parameter is used to distinguish between these two ADXT handles.

(3)When the use_crossfade member of the handle creation parameter structure is set to FALSE, only index 0 can be specified.

use_aix | use_crossfade | Indexes of handles that can be retrieved
--- | --- | ---
TRUE | TRUE | (always NULL)
TRUE | FALSE | (always NULL)
FALSE | TRUE | 0 or 1
FALSE | FALSE | 0 only

[Menu]

ADXCS_GetNumAdxt
Get ADXT handle count

Format
Sint32 ADXCS_GetNumAdxt(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Number of ADXT handles

Description

Gets the number of ADXT handles in an ADXCS handle.

Remarks

When the use_aix member of the handle creation parameter structure is set to TRUE, the return value is always 0 because AIXP handles are used for playback.

use_aix | use_crossfade | Number of handles that can be retrieved
--- | --- | ---
TRUE | TRUE | 0
TRUE | FALSE | 0
FALSE | TRUE | 2
FALSE | FALSE | 1

[Menu]

ADXCS_GetActiveAixp
Get active AIXP handle

Format
AIXP ADXCS_GetActiveAixp(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The active AIXP handle

Description

Gets the active AXIP handle.

Remarks

When the use_aix member of the handle creation parameter structure is set to FALSE, the return value is always NULL because ADXT handles are used for playback. Use the ADXCS_GetActiveAdxt function to retrieve the required ADXT handle.

[Menu]

ADXCS_GetNextAixp
Get next AIXP handle

Format
AIXP ADXCS_GetNextAixp(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The next AIXP handle

Description

Gets the next AIXP handle.

Remarks

When the use_aix member of the handle creation parameter structure is set to FALSE, the return value is always NULL because ADXT handles are used for playback. Use the ADXCS_GetNextAdxt function to retrieve the required ADXT handle.

[Menu]

ADXCS_GetAixp
Get AIXP handle by index

Format
AIXP ADXCS_GetAixp(ADXCS adxcs, Sint32 index)
Input

adxcs: ADXCS handle

index: AIXP handle index number (0 or 1)

Output

None

Return Value

The AIXP handle for the specified index

Description

Gets the AIXP handle for the specified index.

Remarks

(1)When the use_aix member of the handle creation parameter structure is set to FALSE, the return value is always NULL because ADXT handles are used for playback. Use the ADXCS_GetAdxt function to retrieve the required ADXT handle.

(2)When the use_crossfade member of the handle creation parameter structure is set to TRUE, two AIXP handles are stored internally for each ADXCS handle. The index number parameter is used to distinguish between these two AIXP handles.

(3)When the use_crossfade member of the handle creation parameter structure is set to FALSE, only index 0 can be specified.

use_aix | use_crossfade | Indexes of handles that can be retrieved
--- | --- | ---
TRUE | TRUE | 0 or 1
TRUE | FALSE | 0 only
FALSE | TRUE | (always NULL)
FALSE | FALSE | (always NULL)

[Menu]

ADXCS_GetNumAixp
Get AIXP handle count

Format
Sint32 ADXCS_GetNumAixp(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

The number of AIXP handles

Description

Gets the number of AIXP handles in an ADXCS handle.

Remarks

When the use_aix member of the handle creation parameter structure is set to FALSE, the return value is always 0 because ADXT handles are used for playback.

use_aix | use_crossfade | Number of handles that can be retrieved
--- | --- | ---
TRUE | TRUE | 2
TRUE | FALSE | 1
FALSE | TRUE | 0
FALSE | FALSE | 0

[Menu]

ADXCS_CancelFading
Cancel fading

Format
void ADXCS_CancelFading(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

None

Description

Cancels fader operation and restores the original volume.

Remarks

During crossfading, playback is not restarted by this function when fade out has already finished and playback has stopped.

[Menu]

ADXCS_GetFadeStat
Get fader state

Format
Sint32 ADXCS_GetFadeStat(ADXCS adxcs)
Input

adxcs: ADXCS handle

Output

None

Return Value

Fader state (ADXCS_FADE_STAT_~)

Description

Gets the fader state.

The following is a list of fader states.

Define | Remarks
--- | ---
ADXCS_FADE_STAT_IDLE | Not performing fading
ADXCS_FADE_STAT_FADING | Performing fading

[Menu]

ADXCS_SetCbFunc
Register fader callback function

Format
void ADXCS_SetCbFunc(ADXCS adxcs, void (*fn)(ADXCS adxcs, Sint32 cb_type))
Input

adxcs: ADXCS handle

fn: Pointer to a fader callback function

Output

None

Return Value

None

Description

Registers a fader callback function.

The callback function type is passed to the callback function in the cb_type parameter. The following is a list of callback function types.

Define | Remarks
--- | ---
ADXCS_CB_START_FADE_OUT | Fade out started
ADXCS_CB_START_FADE_IN | Fade in started
ADXCS_CB_START_VOL_CHANGE | Volume change started
ADXCS_CB_END_FADE_OUT | Fade out finished
ADXCS_CB_END_FADE_IN | Fade in finished
ADXCS_CB_END_VOL_CHANGE | Volume change finished
ADXCS_CB_END_FADE_ALL | All fading finished

[Menu]

ADXCS_EnableVhl
Enable voice highlight

Format
void ADXCS_EnableVhl(void)
Input

None

Output

None

Return Value

None

Description

Enables voice highlight functionality.

[Menu]

ADXCS_DisableVhl
Disable voice highlight

Format
void ADXCS_DisableVhl (void)
Input

None

Output

None

Return Value

None

Description

Disables voice highlight functionality.

[Menu]

ADXCS_SetVhlDecTime
Set volume decrease time

Format
void ADXCS_SetVhlDecTime(Sint32 dec_time)
Input

dec_time: Time required to decrease volume (in units of Vsync)

Output

None

Return Value

None

Description

Sets the time needed to lower the music volume for voice highlight.

Remarks

Setting the dec_time parameter to 60 gives a volume decrease time of approximately 1 second.

The default value is 30.

[Menu]

ADXCS_GetVhlDecTime
Get volume decrease time

Format
Sint32 ADXCS_GetVhlDecTime(void)
Input

None

Output

None

Return Value

Time required to decrease volume (in units of Vsync)

Description

Gets the time needed to lower the music volume for voice highlight.

[Menu]

ADXCS_SetVhlIncTime
Set volume increase time

Format
void ADXCS_SetVhlIncTime(Sint32 inc_time)
Input

inc_time: Time required to increase volume (in units of Vsync)

Output

None

Return Value

None

Description

Sets the time needed to increase the music volume when restoring the volume after voice highlight.

Remarks

Setting the inc_time parameter to 60 gives a volume increase time of approximately 1 second.

The default value is 60.

[Menu]

ADXCS_GetVhlIncTime
Get volume increase time

Format
Sint32 ADXCS_GetVhlIncTime(void)
Input

None

Output

None

Return Value

Time needed to increase volume (in units of Vsync)

Description

Gets the time needed to increase the music volume when restoring the volume after voice highlight.

[Menu]

ADXCS_SetVhlDecVol
Set volume decrease level

Format
void ADXCS_SetVhlDecVol(Sint32 dec_vol)
Input

dec_vol: Volume decrease (0: 0[dB]to 960: 96.0[dB])

Output

None

Return Value

None

Description

Sets the level of music volume reduction for voice highlight.

Remarks

The default value is 120 (12[dB]).

[Menu]

ADXCS_GetVhlDecVol
Get volume decrease level

Format
Sint32 ADXCS_GetVhlDecVol()
Input

None

Output

None

Return Value

Volume decrease (0: 0[dB]to 960: 96.0[dB])

Description

Gets the level of music volume reduction for voice highlight.

Copyright (c) 2001-2006 CRI Middleware Co.,LTD.