#include <win32/thpaudio.h>typedef struct
{
THPAudioFileInfo audioInfo;
u32 restEncodedSample;
u32 currentFrameNumber;
f64 frameRate;
s16* leftDecodedPtr;
s16* rightDecodedPtr;
u8* leftADPCMPtr;
u8* rightADPCMPtr;
ADPCMINFO leftADPCMInfo;
ADPCMINFO rightADPCMInfo;
THPAudioRecordHeader recordHeader;
s16 leftSampleBuffer [THP_SAMPLE_BUFFER_SIZE];
s16 rightSampleBuffer [THP_SAMPLE_BUFFER_SIZE];
s16 leftDecodedBuffer [THP_SAMPLE_BUFFER_SIZE];
s16 rightDecodedBuffer[THP_SAMPLE_BUFFER_SIZE];
u8 leftADPCMBuffer [THP_ADPCM_BUFFER_SIZE];
u8 rightADPCMBuffer [THP_ADPCM_BUFFER_SIZE];
THPAudioResampleParameter resampleParameter;
BOOL resampleFlag;
} THPAudioHandle;
The THPAudioHandle structure is allocated and initialized when the THPAudioCreateHandle function is called.
Generally, directly manipulating each member of the THPAudioHandle structure is unnecessary. Only resampleFlag must be set.
If the playback frequency is set to 48000 Hz, Revolution will output the audio data at 48043 Hz. If the frequency is set to 32000 Hz, it will output at 32028 Hz. During THP movide data playback, be aware of this Revolution characteristic to maintain synchronization between the video and audio data. You must convert the audio data playback frequency to match the Revolution characteristic in advance during THP movie data creation or with the audio library (AX) during THP movie playback. If using the former process, set resampleFlag to 1. For the latter process, set resampleFlag to 0.
In some cases, referencing the members of the audioInfo(THPAudioFileInfo) structure is necessary.
THPAudioCreateHandle, THPAudioFileInfo
03/01/2006 Initial version.