CRI Middleware Library Reference Manual : AIXP

Constants

[Menu]

AIXP_STAT_~
AIXP handle status

Description

Handle status

Define | Remarks
--- | ---
AIXP_STAT_STOP | Stopped
AIXP_STAT_PREP | Getting AIX header information
AIXP_STAT_PLAYING | Decoding & playback in progress
AIXP_STAT_PLAYEND | Playback completed
AIXP_STAT_ERR | Error occured

Prosses Macros

[Menu]

AIXP_CALC_WORK
Calcultates AIXP work buffer size

Format
AIXP_CALC_WORK(nch, nstm, sfreq, ntr)
Input

nch:maximum number of playback (monaural:1, stereo:2)

nstm:maximum number of DISC streams

sfreq:maximum playback sampling frequency

ntr:maximum number of track

Output

None

Return Value

Work area size [bytes]

Description

Calculates the work area size for each AIXP handle.

[Menu]

AIXP_CALC_WORK_3D
Calcultates AIXP 3D work buffer size

Format
AIXP_CALC_WORK_3D(nstm, sfreq, ntr)
Input

nstm:maximum number of DISC streams

sfreq:maximum playback sampling frequency

ntr:maximum number of track

Output

None

Return Value

Work area size [bytes]

Description

Calculates the work area size of '3D panning' for each AIXP handle.

Data Types

[Menu]

AIXP
AIXP handle

Functions

[Menu]

AIXP_Init
Library initialization

Format
void AIXP_Init(void)
Input

None

Output

None

Return Value

None

Description

Initializes the library

[Menu]

AIXP_Finish
Library termination

Format
void AIXP_Finish(void)
Input

None

Output

None

Return Value

None

Description

Finalizes the library

[Menu]

AIXP_Create
Create AIXP handle

Format
AIXP AIXP_Create(Sint32 maxntr, Sint32 maxnch, void *work, Sint32 worksize)
Input

maxntr: maximum number of tracks

maxnch: maximum number of the channels (stereo : 2, monaural : 1)

work: work area

worksize: Work area size[byte]

Output

None

Return Value

Pointer to generated AIXP structure element (AIXP handle)

Description

Create an AIXP handle.

[Menu]

AIXP_Create3D
Create AIXP handle for realtime 3D panning.

Format
AIXP AIXP_Create3D(Sint32 maxtr, void *work, Sint32 worksize)
Input

maxntr: maximum number of tracks

work: work area

worksize: Work area size[byte]

Output

None

Return Value

Pointer to generated AIXP structure element (AIXP handle)

Description

Creates AIXP handle that can use realtime 3D panning.

[Menu]

AIXP_Destroy
AIXP handle deletion

Format
void AIXP_Destroy(AIXP aixp)
Input

aixp :AIXP handle

Output

None

Return Value

None

Description

Deletes the specified AIXP handle.

[Menu]

AIXP_StartFname
Start playback from disc

Format
void AIXP_StartFname(AIXP aixp, Char8 *fname, void *atr)
Input

aixp: AIXP handle

fname: sound file name

atr: directory name

Output

None

Return Value

None

Description

Starts playback of file specified by fname.

[Menu]

AIXP_StartFnameRange
Start playback from disc by specified the range

Format
void AIXP_StartFnameRange(AIXP aixp, Char8 *fname, void *atr, Sint32 ofst, Sint32 nsct)
Input

aixp: AIXP handle

fname: sound file name

atr: directory name

ofst: offset[sector]

nsct: size[sector]

Output

None

Return Value

None

Description

Starts to play AIX file when you specify file name and the range as a sector.

[Menu]

AIXP_StartAfs
Start index playback from disc

Format
void AIXP_StartAfs(AIXP aixp, Sint32 patid, Sint32 fid)
Input

aixp: AIXP handle

patid: partition ID

fid: file ID

Output

None

Return Value

None

Description

Plays data from Afs file on the disc.

[Menu]

AIXP_StartMem
Start playback from memory

Format
void AIXP_StartMem(AIXP aixp, void *aixdat, Sint32 datlen)
Input

aixp: AIXP handle

aixdat: data address

datlen: data length

Output

None

Return Value

None

Description

Starts playback of AIX data from memory.

[Menu]

AIXP_Stop
Stop playback

Format
void AIXP_Stop(AIXP aixp)
Input

aixp : AIXP handle

Output

None

Return Value

None

Description

Stop AIX playback.

[Menu]

AIXP_Pause
Playback pause and resume

Format
void AIXP_Pause(AIXP aixp, Sint32 sw)
Input

aixp: AIXP handle

sw: pause switch (1 = pause, 2 = resume)

Output

None

Return Value

None

Description

Carries out playback pause and resume. When the switch is set to 1, play pauses; when the switch is set to 0, play resumes. When pause is set when playback is in the STOP state, sound cannot be played back even if the start function is run. When pause is set in the PLAYING state, playback pauses. By releasing pause in the PLAYING state, sound instantly plays back.

[Menu]

AIXP_GetStatPause
Get pause status

Format
Sint32 AIXP_GetStatPause(AIXP aixp)
Input

aixp: AIXP handle

Output

None.

Return Value

1=pause, 0=not pause

Description

Obtains the status of pause.

[Menu]

AIXP_GetStat
Get status

Format
Sint32 AIXP_GetStat(AIXP aixp)
Input

aixp : AIXP handle

Output

None

Return Value

Operation status of current AIXP handle

Description

Gets current operation condition of aixp.

Possible status modes are as follows.

Define | Remarks
--- | ---
AIXP_STAT_STOP | Stopped
AIXP_STAT_PREP | Getting AIX header information
AIXP_STAT_PLAYING | Decoding & playback in progress
AIXP_STAT_PLAYEND | Playback completed
AIXP_STAT_ERR | Error occured

[Menu]

AIXP_AttachMultiChannel
Attachs multi-channel playback function

Format
void AIXP_AttachMultiChannel(AIXP aixp, void *work, Sint32 wksize)
Input

aixp : AIXP handle

work : Working area for multi-channel playback (=NULL)

wksize : Size of multi-channel playback working area (=0)

Output

None

Return Value

None

Description

Attachs multi-channel playback function.

Once this function has been called, all AIX data is played as multi-channel audio, until the AIXP_DetachMultiChannel has been called.

Remarks

Currently, no additional work area is required.

[Menu]

AIXP_DetachMultiChannel
Detachs multi-channel playback function

Format
void AIXP_DetachMultiChannel(AIXP aixp)
Input

aixp : AIXP handle

Output

None

Return Value

None

Description

Detachs multi-channel playback function.

Remarks

This function is effective only when the AIXP_AttachMultiChannel has been called before.

[Menu]

AIXP_SetLpInfo
Set the loop infomation

Format
void AIXP_SetLpInfo(AIXP aixp, Sint32 start_phno, Sint32 length)
Input

aixp: AIXP handle

start_phno:start phrase number

length:loop length in phrase count

Output

None

Return Value

None

Description

Sets the loop infomation (loop start phrase, and loop region length).

[Menu]

AIXP_SetLpSw
Set loop playback

Format
void AIXP_SetLpSw(AIXP aixp, Sint32 sw)
Input

aixp: AIXP handle

sw: loop switch (0 = loop playback OFF, 1 = loop playback ON)

Output

None

Return Value

None

Description

Sets seamless loop playback.

Remarks

To repeat a part of the voice, it is necessary to set the loop section by using the AIXP_SetLpInfo function.

[Menu]

AIXP_SetOutVol
Set output volume

Format
void AIXP_SetOutVol(AIXP aixp, Sint32 vol)
Input

aixp: AIXP handle

vol:attenuation level (from 0: 0dB to -960: -96.0dB)

Output

None.

Return Value

None.

Description

Sets the output volume. Can be used before or during playback.

vol setting values0:-0dB no attenuation (maximum)

-30:-3dB approx. 70%

-60:-6dB approx. 50%

-960:-96dB mute

[Menu]

AIXP_SetTrackVol
Set track volume

Format
void AIXP_SetTrackVol(AIXP aixp, Sint32 trno, Sint32 vol)
Input

aixp: AIXP handle

trno:track No.

vol:attenuation level (from 0: 0dB to -960: -96.0dB)

Output

None.

Return Value

None.

Description

Sets the volume of specified track.

vol setting values0:-0dB no attenuation (maximum)

-30:-3dB approx. 70%

-60:-6dB approx. 50%

-960:-96dB mute

[Menu]

AIXP_GetAdxt
Get ADXT handle

Format
ADXT AIXP_GetAdxt(AIXP aixp, Sint32 trno)
Input

aixp: AIXP handle

trno: track number

Output

None

Return Value

ADXT handle

Description

Get ADXT handle from AIXP handle.

[Menu]

AIXP_GetTime
Get playback time in sample units

Format
void AIXP_GetTime(AIXP aixp, Sint32 *ncount, Sint32 *tscale)
Input

aixp: AIXP handle

Output

ncount: playback sample number

tscale:sampling frequency [Hz]

Return Value

None.

Description

Gets playback time in sample units.

[Menu]

AIXP_GetOutVol
Get output volume setting

Format
void AIXP_GetOutVol(AIXP aixp)
Input

aixp: AIXP handle

Output

None.

Return Value

Output volume setting value (from 0: 0dB to -960: -96.0dB)

Description

Gets the output volume setting.

[Menu]

AIXP_GetTrackVol
Get track volume setting

Format
Sint32 AIXP_GetTrackVol(AIXP aixp, Sint32 trno)
Input

aixp: AIXP handle

trno:track No.

Output

None.

Return Value

Track output volume setting value (from 0: 0dB to -960: -96.0dB)

Description

Gets the volume setting of specified track.

[Menu]

AIXP_SetKeyString
Set key strings to each handle

Format
void AIXP_SetKeyString(AIXP aixp, Char8 *str);
Input

aixp: AIXP handle

str: key strings

Output

None.

Return Value

None.

Description

Sets key strings to each handle. You have to input the same key ode as the key strings input at the time of encoding. When a different key strings from the time of encoding is input, it will become a noise and will be reproduced. NULL is specified to be 'str' when reproducing the ADX data which is not enciphered.

[Menu]

AIXP_ExecServer
Server function

Format
void AIXP_ExecServer(void)
Input

None

Output

None

Return Value

None

Description

Updates the internal status of the library and performs decoding processing.

Remarks

This function is performed within an ADXM_ExecMain function. When performing an ADXM_ExecMain function periodically, it is not necessary to use this function.

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