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<META name="GENERATOR" content="Microsoft FrontPage 5.0"> 7<META http-equiv="Content-Style-Type" content="text/css"> 8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css"> 9<title>THPSimpleDecode</title> 10</head> 11 12<body> 13 14<h1>THPSimpleDecode</h1> 15 16<h2>C Specification</h2> 17 18<dl> 19<dd><pre><code>#include "THPSimple.h"</code></pre> 20 </dd> 21<dd><pre><CODE>s32 THPSimpleDecode(s32 audioTrack);</CODE></pre> 22 </dd> 23</dl> 24 25<h2>Arguments</h2> 26<table border="1" cellpadding="3" cellspacing="0.1"> 27 <tr> 28<td width="120" bgcolor="#ffffe8"><strong><em><CODE>audioTrack</CODE></em></strong></td> 29<td width="520">The audio track number to decode.</td> 30 </tr> 31</table> 32 33<h2>Return Values</h2> 34<p>Returns one of the following values. </p> 35 36<table border="1" cellpadding="3" cellspacing="0.1"> 37 <tbody> 38 <tr ALIGN="center"> 39<td>definition</td> 40<td width=50>value</td> 41<td>description</td> 42 </tr> 43 <tr> 44<td><CODE><CODE>THP_DECODE_OK</CODE></CODE></td> 45 <td align="center">0</td> 46<td>Decoding was successful.</td> 47 </tr> 48 <tr> 49<td><CODE><CODE>THP_VIDEO_DECODE_FAIL</CODE></CODE></td> 50 <td align="center">1</td> 51<td>Decoding failed. </td> 52 </tr> 53 <tr> 54<td><CODE><CODE>THP_NO_READ_BUFFER</CODE></CODE></td> 55 <td align="center">2</td> 56<td>Data was not read in time. </td> 57 </tr> 58 <tr> 59<td><CODE>THP_NO_AUDIO_BUFFER</CODE></td> 60 <td align="center">3</td> 61<td>There is no empty audio buffer. </td> 62 </tr> 63 <tr> 64<td><CODE>THP_INVALID_AUDIO_TRACK</CODE></td> 65 <td align="center">4</td> 66<td>The THP movie data does not have the specified audio track. </td> 67 </tr> 68 </tbody> 69</table> 70 71<H2>Description</H2> 72<p>This function extracts THP video data by calling <a href="../low/THPVideoDecode.html"><code>THPVideoDecode</code></a>, a low-level API in the THP library. In addition, if audio data is interleaved in the THP movie data, this function extracts it by calling <a href="../low/THPAudioDecode.html"><code>THPAudioDecode</code></a>, another low-level API.</p> 73 74<p>The extracted data is stored inside the simple player. </p> 75 76<p>This function's argument specifies the audio track number (from 0 on) to decode. This indicates the audio track number to play automatically. If the THP movie data does not have audio data, the argument is ignored. </p> 77 78<p><strong>Note: Decoding of the THP audio data is performed by the CPU.</strong></p> 79 80 81<H2>See Also</H2> 82<P><a href="../low/THPVideoDecode.html"><code>THPVideoDecode</code></a>, <a href="../low/THPAudioDecode.html"><code>THPAudioDecode</code></a></P> 83 84<H2>Revision History</H2> 85<P>03/01/2006 Initial version.</P> 86</body> 87</html>