1<html> 2 3<head> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css"> 6<title>THPAudioHandle</title> 7</head> 8 9<body> 10 11<h1>THPAudioHandle</h1> 12 13<h2>C Specification</h2> 14 15<dl> 16<dd><pre><code>#include <win32/thpaudio.h></code></pre></dd> 17<dd><pre><code>typedef struct 18{ 19THPAudioFileInfo audioInfo; 20u32 restEncodedSample; 21u32 currentFrameNumber; 22f64 frameRate; 23s16* leftDecodedPtr; 24s16* rightDecodedPtr; 25u8* leftADPCMPtr; 26u8* rightADPCMPtr; 27ADPCMINFO leftADPCMInfo; 28ADPCMINFO rightADPCMInfo; 29THPAudioRecordHeader recordHeader; 30s16 leftSampleBuffer [THP_SAMPLE_BUFFER_SIZE]; 31s16 rightSampleBuffer [THP_SAMPLE_BUFFER_SIZE]; 32s16 leftDecodedBuffer [THP_SAMPLE_BUFFER_SIZE]; 33s16 rightDecodedBuffer[THP_SAMPLE_BUFFER_SIZE]; 34u8 leftADPCMBuffer [THP_ADPCM_BUFFER_SIZE]; 35u8 rightADPCMBuffer [THP_ADPCM_BUFFER_SIZE]; 36THPAudioResampleParameter resampleParameter; 37BOOL resampleFlag; 38} THPAudioHandle;</code></pre></dd> 39 40</dl> 41 42<h2>Description</h2> 43<p> 44The <code>THPAudioHandle</code> structure is allocated and initialized when the <A href="THPAudioCreateHandle.html"><code>THPAudioCreateHandle</code></A> function is called. 45</p> 46<p> 47Generally, directly manipulating each member of the <code>THPAudioHandle</code> structure is unnecessary. Only <code>resampleFlag</code> must be set. 48</p> 49<p> 50If 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 <code>resampleFlag</code> to 1. For the latter process, set <code>resampleFlag</code> to 0. 51</p> 52<p> 53In some cases, referencing the members of the <code>audioInfo</code>(<A href="THPAudioFileInfo.html"><code>THPAudioFileInfo</code></A>) structure is necessary. 54</p> 55 56<h2>See Also</h2> 57<p> 58<A href="THPAudioCreateHandle.html"><code>THPAudioCreateHandle</code></A>, <A href="THPAudioFileInfo.html"><code>THPAudioFileInfo</code></A> 59</p> 60 61<h2>Revision History</h2> 62<P>03/01/2006 Initial version.</P> 63 64</body> 65</html>