Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > os > by-pkgid > 9c481c872fb0ae0cbadccdc2f4a18ab6 > files > 187

libasync-devel-0.17.0-5.fc14.x86_64.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>Async: Async::AudioRecorder Class 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="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceAsync.html">Async</a>::<a class="el" href="classAsync_1_1AudioRecorder.html">AudioRecorder</a>
  </div>
</div>
<div class="contents">
<h1>Async::AudioRecorder Class Reference</h1><!-- doxytag: class="Async::AudioRecorder" --><!-- doxytag: inherits="Async::AudioSink" -->
<p>A class for recording raw audio to a file.  
<a href="#_details">More...</a></p>

<p><code>#include &lt;<a class="el" href="AsyncAudioRecorder_8h_source.html">AsyncAudioRecorder.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Async::AudioRecorder:</div>
<div class="dynsection">
 <div class="center">
  <img src="classAsync_1_1AudioRecorder.png" usemap="#Async::AudioRecorder_map" alt=""/>
  <map id="Async::AudioRecorder_map" name="Async::AudioRecorder_map">
<area href="classAsync_1_1AudioSink.html" alt="Async::AudioSink" shape="rect" coords="0,0,140,24"/>
</map>
 </div>
</div>

<p><a href="classAsync_1_1AudioRecorder-members.html">List of all members.</a></p>
<h2>Public Types</h2>
<ul>
<li>enum <a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475">Format</a> { <a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475a519f1720780552abcc43b12d774deefc">FMT_RAW</a>, 
<a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475a608e0bd5401ffd85b89443324b6f0686">FMT_WAV</a>
 }
</ul>
<h2>Public Member Functions</h2>
<ul>
<li><a class="el" href="classAsync_1_1AudioRecorder.html#a6be2a693ca4f2bcfd9abdb86c1c408b9">AudioRecorder</a> (const std::string &amp;filename, <a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475">AudioRecorder::Format</a> format=FMT_RAW, int sample_rate=0)
<dl class="el"><dd class="mdescRight">Default constuctor.  <a href="#a6be2a693ca4f2bcfd9abdb86c1c408b9"></a><br/></dl><li><a class="el" href="classAsync_1_1AudioRecorder.html#a432227f7d58189855e57aad66c9a8b2f">~AudioRecorder</a> (void)
<dl class="el"><dd class="mdescRight">Destructor.  <a href="#a432227f7d58189855e57aad66c9a8b2f"></a><br/></dl><li>bool <a class="el" href="classAsync_1_1AudioRecorder.html#a429d4203276b91fcec3975416a30002b">initialize</a> (void)
<dl class="el"><dd class="mdescRight">Initialize the recorder.  <a href="#a429d4203276b91fcec3975416a30002b"></a><br/></dl><li>virtual int <a class="el" href="classAsync_1_1AudioRecorder.html#ac0cf4ae2820567de1cb23426aa2ae0da">writeSamples</a> (const float *samples, int count)
<dl class="el"><dd class="mdescRight">Write samples into this audio sink.  <a href="#ac0cf4ae2820567de1cb23426aa2ae0da"></a><br/></dl><li>virtual void <a class="el" href="classAsync_1_1AudioRecorder.html#ab353029ae5f9db96ab63f254d6a01c44">flushSamples</a> (void)
<dl class="el"><dd class="mdescRight">Tell the sink to flush the previously written samples.  <a href="#ab353029ae5f9db96ab63f254d6a01c44"></a><br/></dl></ul>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>A class for recording raw audio to a file. </p>
<dl class="author"><dt><b>Author:</b></dt><dd>Tobias Blomberg / SM0SVX </dd></dl>
<dl class="date"><dt><b>Date:</b></dt><dd>2005-08-29</dd></dl>
<p>Use this class to stream audio into a file. The audio is stored in raw format, only samples no header. </p>

<p>Definition at line <a class="el" href="AsyncAudioRecorder_8h_source.html#l00118">118</a> of file <a class="el" href="AsyncAudioRecorder_8h_source.html">AsyncAudioRecorder.h</a>.</p>
<hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="a3216d496596ae096ff4599d5c11e8475"></a><!-- doxytag: member="Async::AudioRecorder::Format" ref="a3216d496596ae096ff4599d5c11e8475" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475">Async::AudioRecorder::Format</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="a3216d496596ae096ff4599d5c11e8475a519f1720780552abcc43b12d774deefc"></a><!-- doxytag: member="FMT_RAW" ref="a3216d496596ae096ff4599d5c11e8475a519f1720780552abcc43b12d774deefc" args="" -->FMT_RAW</em>&nbsp;</td><td>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a3216d496596ae096ff4599d5c11e8475a608e0bd5401ffd85b89443324b6f0686"></a><!-- doxytag: member="FMT_WAV" ref="a3216d496596ae096ff4599d5c11e8475a608e0bd5401ffd85b89443324b6f0686" args="" -->FMT_WAV</em>&nbsp;</td><td>
</td></tr>
</table>
</dd>
</dl>

<p>Definition at line <a class="el" href="AsyncAudioRecorder_8h_source.html#l00121">121</a> of file <a class="el" href="AsyncAudioRecorder_8h_source.html">AsyncAudioRecorder.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a6be2a693ca4f2bcfd9abdb86c1c408b9"></a><!-- doxytag: member="Async::AudioRecorder::AudioRecorder" ref="a6be2a693ca4f2bcfd9abdb86c1c408b9" args="(const std::string &amp;filename, AudioRecorder::Format format=FMT_RAW, int sample_rate=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Async::AudioRecorder::AudioRecorder </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&nbsp;</td>
          <td class="paramname"> <em>filename</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475">AudioRecorder::Format</a>&nbsp;</td>
          <td class="paramname"> <em>format</em> = <code>FMT_RAW</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>sample_rate</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [explicit]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Default constuctor. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>The name of the file to record audio to </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>format</em>&nbsp;</td><td>The file format (</td></tr>
  </table>
  </dd>
</dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classAsync_1_1AudioRecorder.html#a3216d496596ae096ff4599d5c11e8475">Format</a>) </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sample_rate</em>&nbsp;</td><td>The sample rate (only needed for format != FMT_RAW) </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a432227f7d58189855e57aad66c9a8b2f"></a><!-- doxytag: member="Async::AudioRecorder::~AudioRecorder" ref="a432227f7d58189855e57aad66c9a8b2f" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Async::AudioRecorder::~AudioRecorder </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="ab353029ae5f9db96ab63f254d6a01c44"></a><!-- doxytag: member="Async::AudioRecorder::flushSamples" ref="ab353029ae5f9db96ab63f254d6a01c44" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual void Async::AudioRecorder::flushSamples </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tell the sink to flush the previously written samples. </p>
<p>This function is used to tell the sink to flush previously written samples. When done flushing, the sink should call the sourceAllSamplesFlushed function. This function is normally only called from a connected source object. </p>

<p>Reimplemented from <a class="el" href="classAsync_1_1AudioSink.html#adde14468248671c6c5c85eb47234e0fa">Async::AudioSink</a>.</p>

</div>
</div>
<a class="anchor" id="a429d4203276b91fcec3975416a30002b"></a><!-- doxytag: member="Async::AudioRecorder::initialize" ref="a429d4203276b91fcec3975416a30002b" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Async::AudioRecorder::initialize </td>
          <td>(</td>
          <td class="paramtype">void&nbsp;</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialize the recorder. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>Return <em>true</em> if the initialization was successful </dd></dl>

</div>
</div>
<a class="anchor" id="ac0cf4ae2820567de1cb23426aa2ae0da"></a><!-- doxytag: member="Async::AudioRecorder::writeSamples" ref="ac0cf4ae2820567de1cb23426aa2ae0da" args="(const float *samples, int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int Async::AudioRecorder::writeSamples </td>
          <td>(</td>
          <td class="paramtype">const float *&nbsp;</td>
          <td class="paramname"> <em>samples</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Write samples into this audio sink. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>samples</em>&nbsp;</td><td>The buffer containing the samples </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>The number of samples in the buffer </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns the number of samples that has been taken care of</dd></dl>
<p>This function is used to write audio into this audio sink. If it returns 0, no more samples should be written until the resumeOutput function in the source have been called. This function is normally only called from a connected source object. </p>

<p>Reimplemented from <a class="el" href="classAsync_1_1AudioSink.html#a490aa6380d6b0069fc501f0d9f62e236">Async::AudioSink</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="AsyncAudioRecorder_8h_source.html">AsyncAudioRecorder.h</a></li>
</ul>
</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>