Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 208eeb8b1b7bb51bba095eb93ef0795f > files > 52

libccaudio0.5-0.5.3-1mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>ost::AudioCodec class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.10 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; </center>
<hr><h1>ost::AudioCodec  Class Reference</h1>The codec class is a virtual used for transcoding audio samples between linear frames (or other known format) and an encoded "sample" buffer. process codec interface. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="audio_8h-source.html">audio.h</a>&gt;</code>
<p>
<p>Inheritance diagram for ost::AudioCodec::
<p><center><img src="classost_1_1_audio_codec.gif" usemap="#ost::AudioCodec_map" border="0"></center>
<map name="ost::AudioCodec_map">
<area href="classost_1_1_audio_sample.html" alt="ost::AudioSample" shape="rect" coords="0,0,108,24">
</map>
<a href="classost_1_1_audio_codec-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a0">Encode</a> (unsigned short *buffer, unsigned <a class="el" href="classost_1_1_audio_sample.html#n3">samples</a>=0, int channel=0)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Encode a linear sample frame into the codec sample buffer.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a1">Encode</a> (<a class="el" href="classost_1_1_audio_sample.html">AudioSample</a> *sample)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Encode an "AudioSamples" object into the new encoding scheme if conversion is supported.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a2">Decode</a> (unsigned short *buffer, int channel=0)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decode the sample frame into linear samples.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual bool&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a3">Decode</a> (<a class="el" href="classost_1_1_audio_sample.html">AudioSample</a> *sample)=0</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Decode into an :<a class="el" href="classost_1_1_audio_sample.html">AudioSample</a>" if the conversion is supported.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a4">Load</a> (unsigned char *data, unsigned <a class="el" href="classost_1_1_audio_codec.html#n0">length</a>)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Load a codec from a byte stream data source.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a5">Save</a> (unsigned char *data, unsigned <a class="el" href="classost_1_1_audio_codec.html#n0">length</a>)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Save a codec to a byte stream data source.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a6">getLength</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get current number of samples of data, based on load or encode.</em> <a href="#a6">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a7">getFrameSize</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Get size of the audio frame.</em> <a href="#a7">More...</a><em></em></font><br><br></td></tr>
<tr><td nowrap align=right valign=top>virtual unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#a8">getChannels</a> (void)</td></tr>
<tr><td>&nbsp;</td><td><font size=-1><em>Check if stereo/multi-channel codec.</em> <a href="#a8">More...</a><em></em></font><br><br></td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#b0">AudioCodec</a> (unsigned frames, <a class="el" href="namespaceost.html#a56">audioencoding_t</a> <a class="el" href="classost_1_1_audio_sample.html#n0">encoding</a>, unsigned <a class="el" href="classost_1_1_audio_sample.html#n1">rate</a>)</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top>unsigned&nbsp;</td><td valign=bottom><a class="el" href="classost_1_1_audio_codec.html#n0">length</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
The codec class is a virtual used for transcoding audio samples between linear frames (or other known format) and an encoded "sample" buffer. process codec interface.
<p>
This class is only abstract and describes the core interface for loadable codec modules. This class is normally merged with <a class="el" href="classost_1_1_audio_sample.html">AudioSample</a>. A derived AudioCodecXXX will typically include a AudioRegisterXXX static class to automatically initialize and register the codec with the codec registry.
<p>
<dl compact><dt><b>
Author: </b><dd>
David Sugar &lt;<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>&gt; </dl>
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="b0" doxytag="ost::AudioCodec::AudioCodec"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> ost::AudioCodec::AudioCodec </td>
          <td class="md">(&nbsp;</td>
          <td class="md">unsigned</td>
          <td class="mdname">&nbsp; <em>frames</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md"><a class="el" href="namespaceost.html#a56">audioencoding_t</a></td>
          <td class="mdname">&nbsp; <em>encoding</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">unsigned</td>
          <td class="mdname">&nbsp; <em>rate</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [protected]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="a3" doxytag="ost::AudioCodec::Decode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual bool ost::AudioCodec::Decode </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="classost_1_1_audio_sample.html">AudioSample</a> *</td>
          <td class="mdname1">&nbsp; <em>sample</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Decode into an :<a class="el" href="classost_1_1_audio_sample.html">AudioSample</a>" if the conversion is supported.
<p>
<dl compact><dt><b>
Returns: </b><dd>
true if successful. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>object
</em>&nbsp;</td><td>
to save into. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a2" doxytag="ost::AudioCodec::Decode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual unsigned ost::AudioCodec::Decode </td>
          <td class="md">(&nbsp;</td>
          <td class="md">unsigned short *</td>
          <td class="mdname">&nbsp; <em>buffer</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>channel</em> = 0</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Decode the sample frame into linear samples.
<p>
<dl compact><dt><b>
Returns: </b><dd>
number of samples extracted. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>sample
</em>&nbsp;</td><td>
buffer to save linear samples into. </td></tr>
<tr><td valign=top><em>channel
</em>&nbsp;</td><td>
number or 0 for all channels. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a1" doxytag="ost::AudioCodec::Encode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual bool ost::AudioCodec::Encode </td>
          <td class="md">(&nbsp;</td>
          <td class="md"><a class="el" href="classost_1_1_audio_sample.html">AudioSample</a> *</td>
          <td class="mdname1">&nbsp; <em>sample</em>          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Encode an "AudioSamples" object into the new encoding scheme if conversion is supported.
<p>
<dl compact><dt><b>
Returns: </b><dd>
true if successful. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>object
</em>&nbsp;</td><td>
source. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a0" doxytag="ost::AudioCodec::Encode"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual void ost::AudioCodec::Encode </td>
          <td class="md">(&nbsp;</td>
          <td class="md">unsigned short *</td>
          <td class="mdname">&nbsp; <em>buffer</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">unsigned</td>
          <td class="mdname">&nbsp; <em>samples</em> = 0, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">int</td>
          <td class="mdname">&nbsp; <em>channel</em> = 0</td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [pure virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Encode a linear sample frame into the codec sample buffer.
<p>
<dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>linear
</em>&nbsp;</td><td>
sample buffer to encode. </td></tr>
<tr><td valign=top><em>number
</em>&nbsp;</td><td>
of samples, or use default count. </td></tr>
<tr><td valign=top><em>channel
</em>&nbsp;</td><td>
number or 0 for all channels. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a4" doxytag="ost::AudioCodec::Load"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual unsigned ost::AudioCodec::Load </td>
          <td class="md">(&nbsp;</td>
          <td class="md">unsigned char *</td>
          <td class="mdname">&nbsp; <em>data</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">unsigned</td>
          <td class="mdname">&nbsp; <em>length</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Load a codec from a byte stream data source.
<p>
This is used for streaming of compressed codec's where frames are of irregular sizes.
<p>
<dl compact><dt><b>
Returns: </b><dd>
number of bytes actually read into codec workspace. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pointer
</em>&nbsp;</td><td>
to byte data stream. </td></tr>
<tr><td valign=top><em>number
</em>&nbsp;</td><td>
of data bytes. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a5" doxytag="ost::AudioCodec::Save"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual unsigned ost::AudioCodec::Save </td>
          <td class="md">(&nbsp;</td>
          <td class="md">unsigned char *</td>
          <td class="mdname">&nbsp; <em>data</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md">unsigned</td>
          <td class="mdname">&nbsp; <em>length</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Save a codec to a byte stream data source.
<p>
This is used for streaming of compressed codec's where frames are of irregular sizes.
<p>
<dl compact><dt><b>
Returns: </b><dd>
number of bytes actually written to workspace. </dl><dl compact><dt><b>
Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>pointer
</em>&nbsp;</td><td>
to byte data stream. </td></tr>
<tr><td valign=top><em>size
</em>&nbsp;</td><td>
of byte data stream. </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a8" doxytag="ost::AudioCodec::getChannels"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> virtual unsigned ost::AudioCodec::getChannels </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [virtual]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Check if stereo/multi-channel codec.
<p>
    </td>
  </tr>
</table>
<a name="a7" doxytag="ost::AudioCodec::getFrameSize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned ost::AudioCodec::getFrameSize </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get size of the audio frame.
<p>
    </td>
  </tr>
</table>
<a name="a6" doxytag="ost::AudioCodec::getLength"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned ost::AudioCodec::getLength </td>
          <td class="md">(&nbsp;</td>
          <td class="md">void</td>
          <td class="mdname1">&nbsp;          </td>
          <td class="md">)&nbsp;</td>
          <td class="md"><code> [inline]</code></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Get current number of samples of data, based on load or encode.
<p>
<dl compact><dt><b>
Returns: </b><dd>
length. </dl>    </td>
  </tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a name="n0" doxytag="ost::AudioCodec::length"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> unsigned ost::AudioCodec::length<code> [protected]</code>
      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="audio_8h-source.html">audio.h</a></ul>
<hr><address><small>Generated at Sat Nov 3 09:46:02 2001 for ccAudio by
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.10 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2001</small></address>
</body>
</html>