1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<LINK rel="stylesheet" type="text/css" href="../../../CSS/revolution.css">
7<title>THPAudioWriteFrame</title>
8</head>
9
10<body>
11
12<h1>THPAudioWriteFrame</h1>
13
14<h2>Syntax</h2>
15<dl><dd><pre class="construction">
16#include &lt;win32/thpaudio.h&gt;
17
18s32 THPAudioWriteFrame(THPAudioHandle* handle, FILE* output, s32 flag);
19</pre></dd></dl>
20
21<h2>Arguments</h2>
22<TABLE class="arguments" border="1" >
23  <tr>
24<th>handle</th>
25<td>Pointer to a <A href="THPAudioHandle.html"><code>THPAudioHandle</code></A> structure.</td>
26  </tr>
27  <tr>
28<th>output</th>
29<td>File pointer to output file.</td>
30  </tr>
31  <tr>
32<th>flag</th>
33<td>Final frame flag.</td>
34  </tr>
35</table>
36
37<h2>Return Values</h2>
38<p>
39Returns <code>TRUE</code> if successful, <code>FALSE</code> otherwise.
40</p>
41
42<h2>Description</h2>
43<p>
44Gets the audio data of the current frame from the wav file associated with <SPAN class="argument">handle</SPAN>. After that, the obtained data is encoded using ADPCM, and output to <SPAN class="argument">output</SPAN>.
45</p>
46<p>
47The <code>THPAudioWriteFrame</code> function determines the current frame at the time of invocation by referencing the <code>currentFrameNumber</code> member of the <A href="THPAudioHandle.html"><code>THPAudioHandle</code></A> structure. This <code>currentFrameNumber</code> member is initialized by the <A href="THPAudioCreateHandle.html"><code>THPAudioCreateHandle</code></A> function and is updated each time the <code>THPAudioWriteFrame</code> function is called.
48</p>
49<p>
50<SPAN class="argument">flag</SPAN> is normally set to 0. Please set it to 1 when outputting the final frame of audio data.
51</p>
52
53<h2>See Also</h2>
54<p class="reference">
55<A href="THPAudioCreateHandle.html">THPAudioCreateHandle</A>,
56<A href="THPAudioHandle.html">THPAudioHandle</A>
57</p>
58
59<h2>Revision History</h2>
60<P>
612006/03/01 Initial version.<br>
62</P>
63
64<hr><p>CONFIDENTIAL</p></body>
65</html>