THPAudioWriteFrame

Syntax

#include <win32/thpaudio.h>

s32 THPAudioWriteFrame(THPAudioHandle* handle, FILE* output, s32 flag);

Arguments

handle Pointer to a THPAudioHandle structure.
output File pointer to output file.
flag Final frame flag.

Return Values

Returns TRUE if successful, FALSE otherwise.

Description

Gets the audio data of the current frame from the wav file associated with handle. After that, the obtained data is encoded using ADPCM, and output to output.

The THPAudioWriteFrame function determines the current frame at the time of invocation by referencing the currentFrameNumber member of the THPAudioHandle structure. This currentFrameNumber member is initialized by the THPAudioCreateHandle function and is updated each time the THPAudioWriteFrame function is called.

flag is normally set to 0. Please set it to 1 when outputting the final frame of audio data.

See Also

THPAudioCreateHandle, THPAudioHandle

Revision History

2006/03/01 Initial version.


CONFIDENTIAL