Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates > by-pkgid > e00b64b902be9cec16072aebc13bf07b > files > 20

libfishsound-doc-1.0.0-2.fc13.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libfishsound: decode.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.2-20100208 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>decode.h File Reference</h1>
<p>Decode functions and callback prototypes.  
<a href="#_details">More...</a></p>

<p><a href="decode_8h_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8h.html#abc40e3343ebff3d1418835569079b2c8">FishSoundDecoded_Float</a> )(<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, float *pcm[], long frames, void *user_data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signature of a callback for libfishsound to call when it has decoded PCM audio data, and you want this provided as non-interleaved floats.  <a href="#abc40e3343ebff3d1418835569079b2c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef int(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8h.html#a8ba661947284a888e24f7e5d0b076828">FishSoundDecoded_FloatIlv</a> )(<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, float **pcm, long frames, void *user_data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Signature of a callback for libfishsound to call when it has decoded PCM audio data, and you want this provided as interleaved floats.  <a href="#a8ba661947284a888e24f7e5d0b076828"></a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8h.html#ae821800e11efe106676d7ce4c743328a">fish_sound_set_decoded_float</a> (<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, <a class="el" href="decode_8h.html#abc40e3343ebff3d1418835569079b2c8">FishSoundDecoded_Float</a> decoded, void *user_data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback for libfishsound to call when it has a block of decoded PCM audio ready, and you want this provided as non-interleaved floats.  <a href="#ae821800e11efe106676d7ce4c743328a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8h.html#a3a4055f579b841a5c05d2a2865f5e939">fish_sound_set_decoded_float_ilv</a> (<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, <a class="el" href="decode_8h.html#a8ba661947284a888e24f7e5d0b076828">FishSoundDecoded_FloatIlv</a> decoded, void *user_data)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the callback for libfishsound to call when it has a block of decoded PCM audio ready, and you want this provided as interleaved floats.  <a href="#a3a4055f579b841a5c05d2a2865f5e939"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">long&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="decode_8h.html#a070a1843d6990a00e2471945d40645c7">fish_sound_decode</a> (<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, unsigned char *buf, long bytes)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Decode a block of compressed data.  <a href="#a070a1843d6990a00e2471945d40645c7"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Decode functions and callback prototypes. </p>
<hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="abc40e3343ebff3d1418835569079b2c8"></a><!-- doxytag: member="decode.h::FishSoundDecoded_Float" ref="abc40e3343ebff3d1418835569079b2c8" args=")(FishSound *fsound, float *pcm[], long frames, void *user_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* <a class="el" href="decode_8h.html#abc40e3343ebff3d1418835569079b2c8">FishSoundDecoded_Float</a>)(<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, float *pcm[], long frames, void *user_data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signature of a callback for libfishsound to call when it has decoded PCM audio data, and you want this provided as non-interleaved floats. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fsound</em>&nbsp;</td><td>The FishSound* handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pcm</em>&nbsp;</td><td>The decoded audio </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>frames</em>&nbsp;</td><td>The count of frames decoded </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>Arbitrary user data </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_CONTINUE</em>&nbsp;</td><td>Continue decoding </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_STOP_OK</em>&nbsp;</td><td>Stop decoding immediately and return control to the <a class="el" href="decode_8h.html#a070a1843d6990a00e2471945d40645c7" title="Decode a block of compressed data.">fish_sound_decode()</a> caller </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_STOP_ERR</em>&nbsp;</td><td>Stop decoding immediately, purge buffered data, and return control to the <a class="el" href="decode_8h.html#a070a1843d6990a00e2471945d40645c7" title="Decode a block of compressed data.">fish_sound_decode()</a> caller </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a8ba661947284a888e24f7e5d0b076828"></a><!-- doxytag: member="decode.h::FishSoundDecoded_FloatIlv" ref="a8ba661947284a888e24f7e5d0b076828" args=")(FishSound *fsound, float **pcm, long frames, void *user_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef int(* <a class="el" href="decode_8h.html#a8ba661947284a888e24f7e5d0b076828">FishSoundDecoded_FloatIlv</a>)(<a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *fsound, float **pcm, long frames, void *user_data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signature of a callback for libfishsound to call when it has decoded PCM audio data, and you want this provided as interleaved floats. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fsound</em>&nbsp;</td><td>The FishSound* handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pcm</em>&nbsp;</td><td>The decoded audio </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>frames</em>&nbsp;</td><td>The count of frames decoded </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>Arbitrary user data </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_CONTINUE</em>&nbsp;</td><td>Continue decoding </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_STOP_OK</em>&nbsp;</td><td>Stop decoding immediately and return control to the <a class="el" href="decode_8h.html#a070a1843d6990a00e2471945d40645c7" title="Decode a block of compressed data.">fish_sound_decode()</a> caller </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_STOP_ERR</em>&nbsp;</td><td>Stop decoding immediately, purge buffered data, and return control to the <a class="el" href="decode_8h.html#a070a1843d6990a00e2471945d40645c7" title="Decode a block of compressed data.">fish_sound_decode()</a> caller </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a070a1843d6990a00e2471945d40645c7"></a><!-- doxytag: member="decode.h::fish_sound_decode" ref="a070a1843d6990a00e2471945d40645c7" args="(FishSound *fsound, unsigned char *buf, long bytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long fish_sound_decode </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *&nbsp;</td>
          <td class="paramname"> <em>fsound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long&nbsp;</td>
          <td class="paramname"> <em>bytes</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Decode a block of compressed data. </p>
<p>No internal buffering is done, so a complete compressed audio packet must be passed each time. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fsound</em>&nbsp;</td><td>A FishSound* handle (created with mode FISH_SOUND_DECODE) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>A buffer containing a compressed audio packet </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>A count of bytes to decode (i.e. the length of buf) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of bytes consumed </dd></dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_STOP_OK</em>&nbsp;</td><td>Decoding was stopped by a FishSoundDecode* callback returning FISH_SOUND_STOP_OK before any input bytes were consumed. This will occur when PCM is decoded from previously buffered input, and stopping is immediately requested. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_STOP_ERR</em>&nbsp;</td><td>Decoding was stopped by a FishSoundDecode* callback returning FISH_SOUND_STOP_ERR before any input bytes were consumed. This will occur when PCM is decoded from previously buffered input, and stopping is immediately requested. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_BAD</em>&nbsp;</td><td>Not a valid FishSound* handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_OUT_OF_MEMORY</em>&nbsp;</td><td>Out of memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae821800e11efe106676d7ce4c743328a"></a><!-- doxytag: member="decode.h::fish_sound_set_decoded_float" ref="ae821800e11efe106676d7ce4c743328a" args="(FishSound *fsound, FishSoundDecoded_Float decoded, void *user_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fish_sound_set_decoded_float </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *&nbsp;</td>
          <td class="paramname"> <em>fsound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="decode_8h.html#abc40e3343ebff3d1418835569079b2c8">FishSoundDecoded_Float</a>&nbsp;</td>
          <td class="paramname"> <em>decoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>user_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the callback for libfishsound to call when it has a block of decoded PCM audio ready, and you want this provided as non-interleaved floats. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fsound</em>&nbsp;</td><td>A FishSound* handle (created with mode FISH_SOUND_DECODE) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>decoded</em>&nbsp;</td><td>The callback to call </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>Arbitrary user data to pass to the callback </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Success </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_BAD</em>&nbsp;</td><td>Not a valid FishSound* handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_OUT_OF_MEMORY</em>&nbsp;</td><td>Out of memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3a4055f579b841a5c05d2a2865f5e939"></a><!-- doxytag: member="decode.h::fish_sound_set_decoded_float_ilv" ref="a3a4055f579b841a5c05d2a2865f5e939" args="(FishSound *fsound, FishSoundDecoded_FloatIlv decoded, void *user_data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int fish_sound_set_decoded_float_ilv </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="fishsound_8h.html#a8cfb7dfb102ad1af9ff35046aed3ccd9">FishSound</a> *&nbsp;</td>
          <td class="paramname"> <em>fsound</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="decode_8h.html#a8ba661947284a888e24f7e5d0b076828">FishSoundDecoded_FloatIlv</a>&nbsp;</td>
          <td class="paramname"> <em>decoded</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>user_data</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Set the callback for libfishsound to call when it has a block of decoded PCM audio ready, and you want this provided as interleaved floats. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fsound</em>&nbsp;</td><td>A FishSound* handle (created with mode FISH_SOUND_DECODE) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>decoded</em>&nbsp;</td><td>The callback to call </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>user_data</em>&nbsp;</td><td>Arbitrary user data to pass to the callback </td></tr>
  </table>
  </dd>
</dl>
<dl><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>0</em>&nbsp;</td><td>Success </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_BAD</em>&nbsp;</td><td>Not a valid FishSound* handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>FISH_SOUND_ERR_OUT_OF_MEMORY</em>&nbsp;</td><td>Out of memory </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2-20100208 </small></address>
</body>
</html>