Constants
| [Menu] |
|
Description Sound output status
|
| [Menu] |
|
Description The following constants are play method. These constants are used 'ADXT_CALC_WORK' macro
|
Process Macros
| [Menu] |
|
Format int ADXT_CALC_WORK(nch, stmflg, nstm, sfreq); Input nch: maximum number of playback (monaural:1, stereo:2) stmflg: playback mode ADXT_PLY_MEM: memory playback ADXT_PLY_STM: stream playback nstm: maximum number of DISC streams sfreq: maximum playback sampling frequency Output None. Return Value Work area size (bytes) Description Calculates the work area size for each ADXT handle. The maximum number of DISC streams specifies the number of streams that can be read from DISC simultaneously. When reading from DISC, this is the sum of ADXT handles used simultaneously. Remarks The work area size calculation formula is as follows. work area = input buffer size + output buffer size (sampling frequency 48000Hz, mono)
*1 For stereo playback, double the area is required. *2 The input buffer can be reduced according to the sampling frequency. |
| [Menu] |
|
Format int ADXT_CALC_WORK_3D(stmflg, nstm, sfreq); Input stmflg: playback mode ADXT_PLY_MEM: memory playback ADXT_PLY_STM: stream playback nstm: maximum number of DISC streams sfreq: maximum playback sampling frequency Output None. Return Value Work area size (bytes) Description Calculates the work area size for each ADXT handle. The maximum number of DISC streams specifies the number of streams that can be read from DISC simultaneously. When reading from DISC, this is the sum of ADXT handles and ADXF handles used simultaneously. |
Data Types
| [Menu] |
Functions
| [Menu] |
|
Format void ADXT_Init(void); Input None. Output None. Return Value None. Description Initializes the ADX library. Remarks Registers the server function with the Vsync interrupt. |
| [Menu] |
|
Format void ADXT_Finish(void); Input None. Output None. Return Value None. Description Performs shutdown processing for the ADX library. Deletes created handles Example
|
| [Menu] |
|
Format ADXT ADXT_Create(Sint32 maxnch, void *work, Sint32 worksize); Input maxnch: maximum number of playback channels (mono=1, stereo=2) work: work area worksize: work area size Output None. Return Value Pointer to generated ADXT structure element (ADXT handle) Description Creates an ADXT handle. Remarks maxnch should be set to "1" for mono playback only and to "2" for stereo playback. Also when maxnch is set to "2", mono playback is possible. The work area is allocated by the syMalloc function. |
| [Menu] |
|
Format void ADXT_Destroy(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Deletes the specified ADXT handle. Example
|
| [Menu] |
|
Format void ADXT_DestroyAll(void); Input None. Output None. Return Value None. Description Deletes the all ADXT handle. |
| [Menu] |
|
Format void ADXT_StartFname(ADXT adxt, const Char8 *fname); Input adxt: ADXT handle fnmae: sound file name Output None. Return Value None. Description Starts playback of file specified by fname. When the function is executed for a handle that is already being played, sound output stops and playback of the specified file starts. ADX files and WAV files can be specified as sound files. By executing the function for different handles, several sound files can be played simultaneously. Example
|
| [Menu] |
|
Format void ADXT_StartFnameRange(ADXT adxt, const Char8 *fname, Sint32 offset_sct, Sint32 range_sct); Input adxt: ADXT handle fname: sound file name offset_sct:offset[sector] range_sct:size[sector] Output None. Return Value None. Description Starts playback of file specified by fname and the range. |
| [Menu] |
|
Format void ADXT_StartMem(ADXT adxt, void *adxdat); Input adxt: ADXT handle adxdat: sound data address Output None. Return Value None. Description Plays sound data in memory specified by adxdat. Allows sound playback with better response than DISC stream playback. Delay time is approx. 50 milliseconds. Example
|
| [Menu] |
|
Format void ADXT_StartMem2(ADXT adxt, void *adxdat, Sint32 datlen); Input adxt: ADXT handle adxdat: sound data address datlen: Length of playing ADX data Output None. Return Value None. Description Plays sound data in memory specified by adxdat. Plays to specified length. |
| [Menu] |
|
Format void ADXT_StartMemIdx(ADXT adxt, void *acxdat, Sint32 no); Input adxt: ADXT handle acxdat: ACX data address no: index number Output None. Return Value None. Description Plays data of specified number within ACX data. Example
|
| [Menu] |
|
Format void ADXT_StartAfs(ADXT adxt, Sint32 pat_id, Sint32 file_id); Input adxt: ADXT handle pat_id: partition ID file_id: file ID Output None. Return Value None. Description Plays data from AFS file on the disc. The ADXF_LoadPartitionNw function serves for correlating the par_id and the AFS file name. The file_id refers to the sequential number inside the AFS file. AFSLNK.EXE outputs a header file specifying the file ID. A message corresponding to the file name can also be specified. Example
|
| [Menu] |
|
Format void ADXT_StartSj(ADXT adxt, SJ sj); Input adxt: ADXT handle sj: Stream Joint Output None. Return Value None. Description Plays data of specified Stream Joint. |
| [Menu] |
|
Format void ADXT_Stop(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Stops ADX playback. Example
|
| [Menu] |
|
Format Sint32 ADXT_GetStat(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Operation status of current ADXT handle Description Gets current operation condition of adxt. Possible status modes are as follows.
Example
|
| [Menu] |
|
Format void ADXT_GetTime(ADXT adxt, Sint32 *ncount, Sint32 *tscale); Input adxt: ADXT handle Output ncount: playback sample number tscale:sampling frequency [Hz] Return Value None. Description Gets playback time in sample units. Example
|
| [Menu] |
|
Format Sint32 ADXT_GetTimeReal(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Playback time [1/100sec] Description Gets playback time in real time, using units of 1/100 seconds. Example
|
| [Menu] |
|
Format void ADXT_Pause(ADXT adxt, Sint32 sw); Input adxt: ADXT handle sw: pause switch (1 = pause, 0 = 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. Example
|
| [Menu] |
|
Format Sint32 ADXT_GetStatPause(ADXT adxt); Input adxt: ADXT handle Output None. Return Value 1=pause, 0=not pause Description Obtains the status of pause. |
| [Menu] |
|
Format void ADXT_SetOutVol(ADXT adxt, Sint32 vol); Input adxt: ADXT 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] |
|
Format void ADXT_GetOutVol(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Output volume setting value (from 0: 0dB to -960: -96.0dB) Description Gets the output volume setting. Example
|
| [Menu] |
|
Format void ADXT_SetOutPan(ADXT adxt, Sint32 ch, Sint32 pan); Input adxt:ADXT handle ch: channel number (0 or 1) ADXT_CH_L(0)=left channel, ADXT_CH_R(1)=right channel pan: panpot setting value (from -15 to +15, -128) ADXT_PAN_LEFT = -15, ADXT_PAN_CENTER = 0 ADXT_PAN_RIGHT = 15, ADXT_PAN_AUTO = -128 Output None. Return Value None. Description Sets the output panpot. When the setting is AUTO, panning is performed automatically, depending on whether the sound data are mono or stereo. This setting can be made also during sound playback. |
| [Menu] |
|
Format Sint32 ADXT_GetOutPan(ADXT adxt, Sint32 ch); Input adxt: ADXT handle ch: channel number ADXT_CH_L(0): left channel, ADXT_CH_R(1): right channel Output None. Return Value Panpot setting value (from -15 to +15, -128) Description Gets the output panpot setting. Example
|
| [Menu] |
|
Format void ADXT_SetOutputMono(Sint32 flag); Input flag: monaural output flag (OFF=0, ON=1) Output None. Return Value None. Description Sets the monaural output. When the setting is ON, all stereo data is outputted as monaural data. Both channel data is mixed down. |
| [Menu] |
|
Format void ADXT_SetLpFlg(ADXT adxt, Sint32 flg); Input adxt: ADXT handle flg: 1=loop, 0=not loop Output None. Return Value None. Description Sets whether play a loop or not. You can only release looping play while playing. If you set this flag again, you have to set just before start playing. |
| [Menu] |
|
Format Sint32 ADXT_GetLpCnt(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of times played a loop Description Obtains the number of times that played a loop. |
| [Menu] |
|
Format void ADXT_SetWaitPlayStart(ADXT adxt, Sint32 flg); Input adxt: ADXT handle flg: 1=waits, 0=starts to output sound Output None. Return Value None. Description Sets waiting for starting to output the sound. |
| [Menu] |
|
Format Sint32 ADXT_GetNumSmpl( ADXT adxt ); Input adxt: ADXT handle Output None. Return Value Total number of sound data samples Description Gets total number of sound data samples for current playback. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP = 2) to playback end (ADXT_STAT_PLAYEND = 5). Example
|
| [Menu] |
|
Format Sint32 ADXT_GetDecNumSmpl(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of samples decoded Description Obtains a decoded sample number of sound data. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP) to playback end (ADXT_STAT_PLAYEND). |
| [Menu] |
|
Format Sint32 ADXT_GetSfreq(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Sound data sampling frequency [Hz] Description Gets sampling frequency of currently playing sound data. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP = 2) to playback end (ADXT_STAT_PLAYEND = 5). Example
|
| [Menu] |
|
Format Sint32 ADXT_GetNumChan(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of channels Description Gets sampling frequency of currently playing sound data. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP) to playback end (ADXT_STAT_PLAYEND). |
| [Menu] |
|
Format Sint32 ADXT_GetFmtBps(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of quantization bits Description Gets the number of quantization bits of currently playing sound data. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP) to playback end (ADXT_STAT_PLAYEND). |
| [Menu] |
|
Format Sint32 ADXT_GetHdrLen(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Header length Description Gets header length of currently playing sound data. Remarks This information can be obtained in the interval extending from playback preparation (ADXT_STAT_PREP) to playback end (ADXT_STAT_PLAYEND). |
| [Menu] |
|
Format SJ ADXT_GetInputSj(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Stream Joint Description Obtains Stream Joint for the input. |
| [Menu] |
|
Format Sint32 ADXT_GetNumSctIbuf(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of sector Description Obtains the amount of data that is stored in input buffer. |
| [Menu] |
|
Format float ADXT_GetIbufRemainTime(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Playable time (sec) Description Obtains playable time using only data in input buffer. You can use this function only playing ADX data. |
| [Menu] |
|
Format Sint32 ADXT_IsIbufSafety(ADXT adxt); Input adxt: ADXT handle Output None. Return Value 1=Has enough data, 0=Data are insufficient Description Checks whether the input buffer is having enough data or not. Returns 'TRUE' when data more than the number of sector appointed exist in the input buffer. |
| [Menu] |
|
Format Sint32 ADXT_GetNumSmplObuf(ADXT adxt, Sint32 chno); Input adxt: ADXT handle chno: channel (0=left channel, 1=right channel) Output None. Return Value Number of samples in an output buffer Description Obtains the number of samples in an output buffer. |
| [Menu] |
|
Format Sint32 ADXT_GetStatRead(ADXT adxt); Input adxt: ADXT handle Output None. Return Value 1=read is in progress, 0=read is stopped Description Obtains current status of file read. |
| [Menu] |
|
Format Sint32 ADXT_IsReadyPlayStart(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Checks whether ADXT handle was preparations completion. |
| [Menu] |
|
Format Sint32 ADXT_IsCompleted(ADXT adxt); Input adxt: ADXT handle Output None. Return Value 1=Finished, 0=Playing Description Checks whether the play finished or not. |
| [Menu] |
|
Format void ADXT_SetReloadTime(ADXT adxt,float time,Sint32 nch,Sint32 sfreq); Input adxt: ADXT handle time: start remain time nch: number of channel sfreq: sampling frequency Output None. Return Value None. Description Sets of the time of start sector to reload into input buffer. Reads data from disc when a quantity of data in the input buffer becomes less than 'time' (second). |
| [Menu] |
|
Format void ADXT_SetReloadSct(ADXT adxt, Sint32 minsct); Input adxt: ADXT handle minsct: start sector number Output None. Return Value None. Description Sets of the number of start sector to reload into input buffer. Reads data from disc when a quantity of data in the input buffer becomes less than 'minsct' (sector). |
| [Menu] |
|
Format void ADXT_SetNumRetry(Sint32 num); Input num: the number of retry(-1: infinite retry) Output None. Return Value None. Description Sets the number of retry inside ADX regardless of hardware. |
| [Menu] |
|
Format Sint32 ADXT_GetNumRetry(void); Input None. Output None. Return Value the number of retry(-1: infinite retry) Description Gets the number of retry set by ADXT_SetNumRetry function. |
| [Menu] |
|
Format Sint32 ADXT_GetNumErr(ADXT adxt); Input adxt : ADXT handle Output None. Return Value the number of error Description Gets the number of error occurrences that needs retry. |
| [Menu] |
|
Format void ADXT_SetDefSvrFreq(Sint32 freq); Input freq: server function call frequency (number of calls per second) Output None. Return Value None. Description Sets the call frequency for the server function (ADXT_ExecServer function). This function can be used to control the amount of decoding performed by each server function. The default setting is 60 (Vsync). Remarks This function is not required because the server function is called by the Vsync interrupt. |
| [Menu] |
|
Format void ADXT_SetSvrFreq(ADXT adxt, Sint32 freq); Input adxt: ADXT handle freq: server function call frequency (number of calls per second) Output None. Return Value None. Description Sets the call frequency for the server function (ADXT_ExecServer function). This function can be used to control the amount of decoding performed by each server function. The default setting is 60 (Vsync). Remarks This function is not required because the server function is called by the Vsync interrupt. |
| [Menu] |
|
Format void ADXT_ExecServer(void); Input None. Output None. Return Value None. Description Updates the internal status of the library and performs decoding processing. Remarks Because the ADXT_Init function registers Vsync interrupt processing, the user does not need to call this function. |
| [Menu] |
|
Format void ADXT_ExecHndl(ADXT adxt); Input None. Output None. Return Value None. Description Updates the internal status of an ADXT handle. Remarks Because this function is called from 'ADXT_ExecServer' function, the user does not need to call this function. |
| [Menu] |
|
Format Sint32 ADXT_GetErrCode(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Error code Description Gets error code. This value is held until cleared by the ADXT_ClearErrCode function. Error code table
|
| [Menu] |
|
Format void ADXT_ClearErrCode(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Clears error code. Example
|
| [Menu] |
|
Format void ADXT_EntryFname(ADXT adxt, const Char8 *fname); Input adxt: ADXT handle fname:Audio file name Output None. Return Value None. Description Registers the audio file specified by "fname" as a file for seamless continuous playback. Only ADX data with no loop settings can be registered. Example
|
| [Menu] |
|
Format void ADXT_EntryFnameRange(ADXT adxt, const Char8 *fname, Sint32 ofst_sct, Sint32 range_sct); Input adxt: ADXT handle fname:Audio file name offset_sct:offset[sector] range_sct:size[sector] Output None. Return Value None. Description Registers the audio file specified by filename and the range for seamless continuous playback. |
| [Menu] |
|
Format void ADXT_EntryAfs(ADXT adxt, Sint32 patid, Sint32 fid); Input adxt: ADXT handle patid: partition ID fid: file ID Output None. Return Value None. Description Registers AFS file as seamless continuous playback data. |
| [Menu] |
|
Format void ADXT_ResetEntry(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Reset file registration of seamless continuous playback. Remarks This function can be used only when playback has stopped (ADXT_STAT_STOP). |
| [Menu] |
|
Format void ADXT_StartSeamless(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Starts seamless continuous playback. |
| [Menu] |
|
Format void ADXT_SetSeamlessLp(ADXT adxt, Sint32 flg); Input adxt: ADXT handle flg:0=Loop playback off, 1=Loop playback on. Output None. Return Value None. Description Sets seamless loop playback. |
| [Menu] |
|
Format void ADXT_StartFnameLp(ADXT adxt, const Char8 *fname); Input adxt: ADXT handle fname:Audio file name Output None. Return Value None. Description Plays back the specified audio file repeatedly. |
| [Menu] |
|
Format void ADXT_StartFnameRangeLp(ADXT adxt, const Char8 *fname, Sint32 ofst_sct, Sint32 range_sct); Input adxt: ADXT handle fname:Audio file name offset_sct:offset[sector] range_sct:size[sector] Output None. Return Value None. Description Plays back the specified filename and the range. |
| [Menu] |
|
Format void ADXT_ReleaseSeamless(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Ends seamless continuous playback. |
| [Menu] |
|
Format Sint32 ADXT_GetNumFiles(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Number of files registered Description Gets the number of files that have been registered. |
| [Menu] |
|
Format void ADXT_AttachAhx(ADXT adxt, void *work, Sint32 worksize); Input adxt: ADXT handle work: working area for AHX worksize: size of AHX working area(byte) Output None. Return Value None. Description Attach AHX function. Using this function, it becomes possible to playback an AHX file. |
| [Menu] |
|
Format void ADXT_DetachAhx(ADXT adxt); Input adxt: ADXT handle Output None. Return Value None. Description Detach AHX function. Unuse of AHX is attained. Example
|
| [Menu] |
|
Format void ADXT_SetDefKeyString(Char8 *str); Input str: key strings Output None. Return Value None. Description Sets default key strings. You have to input the same key strings 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. Example
|
| [Menu] |
|
Format void ADXT_SetKeyString(ADXT adxt, Char8 *str); Input adxt: ADXT 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. Example
|
| [Menu] |
|
Format Sint32 ADXT_GetDefOutVol(ADXT adxt); Input adxt: ADXT handle Output None. Return Value Default volume(0:-0dB ... -960:-96.0dB) Description Gets default volume included in the ADX data. |
| [Menu] |
|
Format Sint32 ADXT_GetDefOutPan(ADXT adxt Sint32 chno); Input adxt: ADXT handle chno: Channel number ADXT_CH_L(0):Left channel, ADXT_CH_R(1):Right channel Output None. Return Value Default panpot(-15:left ... 0:center ... +15:right) Description Gets default panpot included in the ADX data. |
| [Menu] |
|
Format Char8 *ADXT_GetDataId(ADXT adxt); Input adxt: ADXT handle Output None. Return Value The data ID Description Gets the data ID included in the ADX data. Format int ADXT_CALC_WORK_3D(stmflg, nstm, sfreq); Input stmflg: playback mode ADXT_PLY_MEM: memory playback ADXT_PLY_STM: stream playback nstm: maximum number of DISC streams sfreq: maximum playback sampling frequency Output None Return Value Work area size [bytes] Description Calculates the work area size for each ADXT handle. The maximum number of DISC streams specifies the number of streams that can be read from DISC simultaneously. When reading from DISC, this is the sum of ADXT handles and ADXF handles used simultaneously. |
| [Menu] |
|
Format ADXT ADXT_Create3D(void *work, Sint32 worksize); Input work: work area worksize: work area size Output None. Return Value Pointer to generated ADXT structure element (ADXT handle) Description Creates an ADXT handle. ADXT handle created using this function supports surround panning. Remarks The work area size is calculated by ADXT_CALC_WORK_3D macro. |
| [Menu] |
|
Format ADXT ADXT_SetOutPos(ADXT adxt, Sint32 x, Sint32 y); Input adxt: ADXT handle x: x-coordinate (-127:left...0:center...+127:right) y: y-coordinate (-127:front...0:center...+127:rear) Output None. Return Value None. Description Sets the position of sound source. Remarks This function is usable only for ADXT handle which was created by ADXT_Create3D function. And, this function has an effect only for mono ADX playback (stereo panning is not supported). NOTE: Hardware decoder (which supports Dolby Digital or Dolby Pro Logic II) is required in order to preview the 3D sound. |
| [Menu] |
|
Format void ADXM_SetupThrd(ADXM_TPRM *tprm); Input tprm: parameter structure of ADX thread Output None. Return Value None. Description Sets up ADX thread system. Creates thread and registers ADX server function.in Vsync thread. Please call ADXM_SetupThrd() in front of ADXT_Init(). Example
Note This function exists only for compatibility. You should use the ADXM_SetupFramework function rather than this function. |
| [Menu] |
|
Format void ADXM_ShutdownThrd(void); Input None. Output None. Return Value None. Description Shuts down ADX thread system. Deletes thread that was created by ADXM_SetupThrd function. Note This function exists only for compatibility. You should use the ADXM_ShutdownFramework function rather than this function. |
| [Menu] |
|
Format Sint32 ADXM_ExecMain(void); Input None. Output None. Return Value None. Description Updates the internal status of the library. Remarks Application must call this function in main loop periodically. Example
|
| [Menu] |
|
Format void ADXM_WaitVsync(void); Input None. Output None. Return Value None. Description Waits for the next Vsync. The main thread sleeps while it is waiting, and the processing time is given to the idle thread. When Sofdec is reproducing, Sofdec decodes by the idle thread while executing this function. Remarks Please do not use this function in the case of single thread framework. Example
|
| [Menu] |
|
Format void ADXM_SetCbErr(void (*func)(void *obj, Char8 *emsg), void *obj) Input func: user callback function obj: 1st argument of callback function Output None. Return Value None. Description Registers an error callback function. When an error occurs, the registered function is called in the following format. void (*func)(*obj, char *emsg); The 1st argument (obj) of this function becomes the 2nd argument of the ADXM_SetCbErr function. The second argument (emsg) is the error message. Because this function is intended for debugging purposes, it should be replaces with a do-nothing function during mastering. Example
|