int status = DecodeAudioFrame(APTR handle, APTR packet, struct DecodeAudioFrameCtrl *ctrl);
struct DecodeAudioFrameCtrl
structure to this function.
This structure looks like the following:
struct DecodeAudioFrameCtrl { WORD *Buffer; // [in] int BufferSize; // [in] int Written; // [out] int Done; // [out] }; |
Your DecodeAudioFrame()
implementation has to write to the following members of
this structure:
Buffer:
BufferSize:
Done
to False
and Hollywood will call you again.
Written:
Done:
False
if there is more audio data to decode in this packet.
In that case, Hollywood will call you again. If you've decoded all audio data
that is in this packet, set this member to True
. Hollywood will then free the
packet using FreePacket().
This function must return a status code: 0 indicates success, any other value indicates failure.
This function must be implemented in a thread-safe way.
struct DecodeAudioFrameCtrl
to be filled out by the function