<!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>AudioRegisterCodec 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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </center> <hr><h1>AudioRegisterCodec Class Reference</h1>This class is used by loadable modules and application specific code to register new codec modules. a base class for codec registration. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="audio_8h-source.html">audio.h</a>></code> <p> <a href="class_audio_register_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 <a class="el" href="audio_8h.html#a53">audioencoding_t</a> </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a0">getEncoding</a> (void)=0</td></tr> <tr><td> </td><td><font size=-1><em>Get the encoding format of this codec registry.</em> <a href="#a0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual unsigned </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a1">getRate</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Get the default sample rate for this codec type.</em> <a href="#a1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual char * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a2">getName</a> (void)=0</td></tr> <tr><td> </td><td><font size=-1><em>Get a logical name for this codec.</em> <a href="#a2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual <a class="el" href="class_audio_codec.html">AudioCodec</a> * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a3">getCodec</a> (unsigned frames)=0</td></tr> <tr><td> </td><td><font size=-1><em>Creates a new codec from the registry class.</em> <a href="#a3">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>virtual <a class="el" href="class_audio_sample.html">AudioSample</a> * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a4">getTone</a> (unsigned f1, unsigned f2, unsigned maxsize, unsigned maxtone=0)=0</td></tr> <tr><td> </td><td><font size=-1><em>Create a new Tone object from the registry class.</em> <a href="#a4">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a5">getFrameSize</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Return minimum codec frame size in samples.</em> <a href="#a5">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#a6">getFrameCount</a> (void)</td></tr> <tr><td> </td><td><font size=-1><em>Get the default or preferred number of frames for optimal performance.</em> <a href="#a6">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> </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#b0">AudioRegisterCodec</a> (unsigned min, unsigned def=1)</td></tr> <tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr> <tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#n0">minframe</a></td></tr> <tr><td nowrap align=right valign=top>unsigned </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#n1">framecnt</a></td></tr> <tr><td colspan=2><br><h2>Friends</h2></td></tr> <tr><td nowrap align=right valign=top>AudioRegisterCodec * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#l0">findCodec</a> (<a class="el" href="audio_8h.html#a53">audioencoding_t</a> encoding, unsigned rate=0)</td></tr> <tr><td> </td><td><font size=-1><em>Locate a codec registry object.</em> <a href="#l0">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>AudioRegisterCodec * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#l1">findCodec</a> (const char *name)</td></tr> <tr><td> </td><td><font size=-1><em>Locate a codec registry object by name.</em> <a href="#l1">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="class_audio_codec.html">AudioCodec</a> * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#l2">getCodec</a> (<a class="el" href="audio_8h.html#a53">audioencoding_t</a> encoding, unsigned rate=0, unsigned frames=0)</td></tr> <tr><td> </td><td><font size=-1><em>Create a new codec object from the registry to use for transcoding.</em> <a href="#l2">More...</a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top><a class="el" href="class_audio_codec.html">AudioCodec</a> * </td><td valign=bottom><a class="el" href="class_audio_register_codec.html#l3">getCodec</a> (const char *name, unsigned frame=0)</td></tr> <tr><td> </td><td><font size=-1><em>Create a new codec object from a named registry to use for transcoding.</em> <a href="#l3">More...</a><em></em></font><br><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> This class is used by loadable modules and application specific code to register new codec modules. a base class for codec registration. <p> A derived xxxRegisterCodec class will typically exist as a static member of an xxxCodec class to automatically register the codec at system load time. <p> <dl compact><dt><b> Author: </b><dd> David Sugar <<a href="mailto:dyfet@ostel.com">dyfet@ostel.com</a>> </dl> <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="b0" doxytag="AudioRegisterCodec::AudioRegisterCodec"></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"> AudioRegisterCodec::AudioRegisterCodec </td> <td class="md">( </td> <td class="md">unsigned</td> <td class="mdname"> <em>min</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>def</em> = 1</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [protected]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a3" doxytag="AudioRegisterCodec::getCodec"></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 <a class="el" href="class_audio_codec.html">AudioCodec</a>* AudioRegisterCodec::getCodec </td> <td class="md">( </td> <td class="md">unsigned</td> <td class="mdname1"> <em>frames</em> </td> <td class="md">) </td> <td class="md"><code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Creates a new codec from the registry class. <p> This creates an object of "frame" size, as a multiple of the min. frame size. This is usually just a new xxxCodec(frames * minframe).<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>number </em> </td><td> of "minframe" sample frames in transcoder. </td></tr> </table> </dl> </td> </tr> </table> <a name="a0" doxytag="AudioRegisterCodec::getEncoding"></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 <a class="el" href="audio_8h.html#a53">audioencoding_t</a> AudioRegisterCodec::getEncoding </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the encoding format of this codec registry. <p> <dl compact><dt><b> Returns: </b><dd> audio encoding format. </dl> </td> </tr> </table> <a name="a6" doxytag="AudioRegisterCodec::getFrameCount"></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 AudioRegisterCodec::getFrameCount </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the default or preferred number of frames for optimal performance. <p> <dl compact><dt><b> Returns: </b><dd> codec transcoding preferred sample resolution. </dl> </td> </tr> </table> <a name="a5" doxytag="AudioRegisterCodec::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 AudioRegisterCodec::getFrameSize </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [inline]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Return minimum codec frame size in samples. <p> <dl compact><dt><b> Returns: </b><dd> codec transcoding sample size resolution. </dl> </td> </tr> </table> <a name="a2" doxytag="AudioRegisterCodec::getName"></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 char* AudioRegisterCodec::getName </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [pure virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get a logical name for this codec. <p> <dl compact><dt><b> Returns: </b><dd> null terminated name string. </dl> </td> </tr> </table> <a name="a1" doxytag="AudioRegisterCodec::getRate"></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 AudioRegisterCodec::getRate </td> <td class="md">( </td> <td class="md">void</td> <td class="mdname1"> </td> <td class="md">) </td> <td class="md"><code> [inline, virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Get the default sample rate for this codec type. <p> <dl compact><dt><b> Returns: </b><dd> samples per second. </dl> </td> </tr> </table> <a name="a4" doxytag="AudioRegisterCodec::getTone"></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 <a class="el" href="class_audio_sample.html">AudioSample</a>* AudioRegisterCodec::getTone </td> <td class="md">( </td> <td class="md">unsigned</td> <td class="mdname"> <em>f1</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>f2</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>maxsize</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>maxtone</em> = 0</td> </tr> <tr> <td></td> <td class="md">) </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> </td> <td> <p> Create a new Tone object from the registry class. <p> This creates a tone buffer (<a class="el" href="class_audio_tone.html">AudioTone</a>-like sample) encoded in the format of the given codec.<dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>first </em> </td><td> tone frequency. </td></tr> <tr><td valign=top><em>second </em> </td><td> tone frequency. </td></tr> <tr><td valign=top><em>max </em> </td><td> frames of sample. </td></tr> <tr><td valign=top><em>max </em> </td><td> frames of tone. </td></tr> </table> </dl><dl compact><dt><b> Returns: </b><dd> audio sample in encoded format. </dl> </td> </tr> </table> <hr><h2>Friends And Related Function Documentation</h2> <a name="l1" doxytag="AudioRegisterCodec::findCodec"></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"> AudioRegisterCodec* findCodec </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname1"> <em>name</em> </td> <td class="md">) </td> <td class="md"><code> [friend]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Locate a codec registry object by name. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>name </em> </td><td> of codec registry to locate. </td></tr> </table> </dl> </td> </tr> </table> <a name="l0" doxytag="AudioRegisterCodec::findCodec"></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"> AudioRegisterCodec* findCodec </td> <td class="md">( </td> <td class="md"><a class="el" href="audio_8h.html#a53">audioencoding_t</a></td> <td class="mdname"> <em>encoding</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>rate</em> = 0</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [friend]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Locate a codec registry object. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>encoding </em> </td><td> of codec registry to locate. </td></tr> <tr><td valign=top><em>optional </em> </td><td> sample rate of codec registry to locate. </td></tr> </table> </dl> </td> </tr> </table> <a name="l3" doxytag="AudioRegisterCodec::getCodec"></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"> <a class="el" href="class_audio_codec.html">AudioCodec</a>* getCodec </td> <td class="md">( </td> <td class="md">const char *</td> <td class="mdname"> <em>name</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>frame</em> = 0</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [friend]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create a new codec object from a named registry to use for transcoding. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>name </em> </td><td> of codec to create. </td></tr> <tr><td valign=top><em>frame </em> </td><td> count to process or 0 for default frame size. </td></tr> </table> </dl> </td> </tr> </table> <a name="l2" doxytag="AudioRegisterCodec::getCodec"></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"> <a class="el" href="class_audio_codec.html">AudioCodec</a>* getCodec </td> <td class="md">( </td> <td class="md"><a class="el" href="audio_8h.html#a53">audioencoding_t</a></td> <td class="mdname"> <em>encoding</em>, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>rate</em> = 0, </td> </tr> <tr> <td></td> <td></td> <td class="md">unsigned</td> <td class="mdname"> <em>frames</em> = 0</td> </tr> <tr> <td></td> <td class="md">) </td> <td class="md" colspan="2"><code> [friend]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> Create a new codec object from the registry to use for transcoding. <p> <dl compact><dt><b> Parameters: </b><dd> <table border=0 cellspacing=2 cellpadding=0> <tr><td valign=top><em>encoding </em> </td><td> of codec to create. </td></tr> <tr><td valign=top><em>optional </em> </td><td> sample rate of codec being created. </td></tr> <tr><td valign=top><em>sample </em> </td><td> frames (multiples of minframe) or 0 for defframe. </td></tr> </table> </dl> </td> </tr> </table> <hr><h2>Member Data Documentation</h2> <a name="n1" doxytag="AudioRegisterCodec::framecnt"></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 AudioRegisterCodec::framecnt<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="n0" doxytag="AudioRegisterCodec::minframe"></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 AudioRegisterCodec::minframe<code> [protected]</code> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </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 Wed Dec 5 07:19:57 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>, © 1997-2001</small></address> </body> </html>