#include <nnsys/snd.h>typedef struct NNSSndArcStrmCallbackInfo
{
int playerNo;
int strmNo;
} NNSSndArcStrmCallbackInfo;typedef struct NNSSndArcStrmCallbackParam
{
int strmNo;
u32 offset;
} NNSSndArcStrmCallbackParam;typedef BOOL (*NNSSndArcStrmCallback)( NNSSndArcStrmCallbackStatus status, const NNSSndArcStrmCallbackInfo* info, NNSSndArcStrmCallbackParam* param, void* arg );
|
The callback state. |
info |
This is the callback information structure pointer. |
param |
This is the callback parameter structure pointer. |
|
The user argument. |
The meaning of the return values varies depending on the callback state, status. FALSE is returned to carry out default processing. Refer to the description above for information about the individual types of status.
This callback function is called at a specified time during stream playback.
It is registered in the NNS_SndArcStrmStartEx2 function and the NNS_SndArcStrmPrepareEx2 function.
The callback function is called at at specified time. The timing it was called with can be determined with the callback state, status. The callback state status obtains the following values.
Table 1. NNSSndArcStrmCallbackStatus
| Label | Description |
|---|---|
| NNS_SND_ARC_STRM_CALLBACK_DATA_END | Data supply of stream without a loop has reached the end of the data. |
The callback information structure info stores additional information for the callback. The meaning of the structure members is as follows.
Table 2. NNSSndArcStrmCallbackInfo
| Member | Description |
|---|---|
| playerNo | The number of the stream player used in the current playback. |
| strmNo | The number of the stream currently being played. |
The meaning of the settings for the callback parameter structure param and the function's return values varies with each callback state status. Refer to the following for information about the processing for each status.
In the future the types of status callback states may increase. Always check the values for status and return FALSE if they are ignored.
If you enter the stream number of the stream data to be played next in the member strmNo of the callback parameter structure param, and return TRUE, the stream data specified will be played in continuation. At this time, you can specify the playback start offset position in units of msec in the member offset of the callback parameter structure param.
If FALSE is returned, the data supply is stopped and the stream stops after the remaining playback of the buffer.
If you want to have continuous playback, the formats of the previous stream data and the data to be played next need to fulfil the following requirements or it will fail.
NNS_SndArcStrmStartEx2, NNS_SndArcStrmPrepareEx2
2004/11/26 Initial version.
CONFIDENTIAL