Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 4f48f620eaa1d8b8f904a92a0540d40f > files > 1323

audaspace-doc-1.3.0-18.mga7.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Audaspace: SquareReader Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Audaspace
   &#160;<span id="projectnumber">1.3.0</span>
   </div>
   <div id="projectbrief">A high level audio library.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classSquareReader-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SquareReader Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class is used for square tone playback.  
 <a href="classSquareReader.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="SquareReader_8h_source.html">SquareReader.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SquareReader:</div>
<div class="dyncontent">
<div class="center"><img src="classSquareReader__inherit__graph.png" border="0" usemap="#SquareReader_inherit__map" alt="Inheritance graph"/></div>
<map name="SquareReader_inherit__map" id="SquareReader_inherit__map">
<area shape="rect"  title="This class is used for square tone playback." alt="" coords="5,80,112,107"/>
<area shape="rect"  href="classIReader.html" title="This class represents a sound source as stream or as buffer which can be read for example by another ..." alt="" coords="24,5,93,32"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a36bebf2745f784863ba5a8f0fe22f05b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#a36bebf2745f784863ba5a8f0fe22f05b">SquareReader</a> (float frequency, <a class="el" href="Specification_8h.html#a11249ca544d179e7fa61b2200a092407">SampleRate</a> sampleRate)</td></tr>
<tr class="memdesc:a36bebf2745f784863ba5a8f0fe22f05b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new reader.  <a href="#a36bebf2745f784863ba5a8f0fe22f05b">More...</a><br /></td></tr>
<tr class="separator:a36bebf2745f784863ba5a8f0fe22f05b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf25460cc612bb0652482eceaaf5ad06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#aaf25460cc612bb0652482eceaaf5ad06">setFrequency</a> (float frequency)</td></tr>
<tr class="memdesc:aaf25460cc612bb0652482eceaaf5ad06"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the frequency of the wave.  <a href="#aaf25460cc612bb0652482eceaaf5ad06">More...</a><br /></td></tr>
<tr class="separator:aaf25460cc612bb0652482eceaaf5ad06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a77588682af5bf9720027d3026b66de"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#a2a77588682af5bf9720027d3026b66de">isSeekable</a> () const</td></tr>
<tr class="memdesc:a2a77588682af5bf9720027d3026b66de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells whether the source provides seeking functionality or not.  <a href="#a2a77588682af5bf9720027d3026b66de">More...</a><br /></td></tr>
<tr class="separator:a2a77588682af5bf9720027d3026b66de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad711eceadb52a8c7f1bd2e1a59e3d388"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#ad711eceadb52a8c7f1bd2e1a59e3d388">seek</a> (int position)</td></tr>
<tr class="memdesc:ad711eceadb52a8c7f1bd2e1a59e3d388"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seeks to a specific position in the source.  <a href="#ad711eceadb52a8c7f1bd2e1a59e3d388">More...</a><br /></td></tr>
<tr class="separator:ad711eceadb52a8c7f1bd2e1a59e3d388"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab04bd3e0e38cdfba0f109a1149e8258f"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#ab04bd3e0e38cdfba0f109a1149e8258f">getLength</a> () const</td></tr>
<tr class="memdesc:ab04bd3e0e38cdfba0f109a1149e8258f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an approximated length of the source in samples.  <a href="#ab04bd3e0e38cdfba0f109a1149e8258f">More...</a><br /></td></tr>
<tr class="separator:ab04bd3e0e38cdfba0f109a1149e8258f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeaa538be5511eb2db6d113232b6f5bbe"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#aeaa538be5511eb2db6d113232b6f5bbe">getPosition</a> () const</td></tr>
<tr class="memdesc:aeaa538be5511eb2db6d113232b6f5bbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the position of the source as a sample count value.  <a href="#aeaa538be5511eb2db6d113232b6f5bbe">More...</a><br /></td></tr>
<tr class="separator:aeaa538be5511eb2db6d113232b6f5bbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a983a405c161cb419e8c205e38924d562"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="structSpecs.html">Specs</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#a983a405c161cb419e8c205e38924d562">getSpecs</a> () const</td></tr>
<tr class="memdesc:a983a405c161cb419e8c205e38924d562"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the specification of the reader.  <a href="#a983a405c161cb419e8c205e38924d562">More...</a><br /></td></tr>
<tr class="separator:a983a405c161cb419e8c205e38924d562"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ba7600e36a11180d980d7388d818e35"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSquareReader.html#a1ba7600e36a11180d980d7388d818e35">read</a> (int &amp;length, bool &amp;eos, <a class="el" href="Audaspace_8h.html#aa0798f7ea0975b143a1d9deac8c05d43">sample_t</a> *buffer)</td></tr>
<tr class="memdesc:a1ba7600e36a11180d980d7388d818e35"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request to read the next length samples out of the source.  <a href="#a1ba7600e36a11180d980d7388d818e35">More...</a><br /></td></tr>
<tr class="separator:a1ba7600e36a11180d980d7388d818e35"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classIReader"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classIReader')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classIReader.html">IReader</a></td></tr>
<tr class="memitem:a3489c23855da532dd3a10cfae78bc899 inherit pub_methods_classIReader"><td class="memItemLeft" align="right" valign="top"><a id="a3489c23855da532dd3a10cfae78bc899"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classIReader.html#a3489c23855da532dd3a10cfae78bc899">~IReader</a> ()</td></tr>
<tr class="memdesc:a3489c23855da532dd3a10cfae78bc899 inherit pub_methods_classIReader"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the reader. <br /></td></tr>
<tr class="separator:a3489c23855da532dd3a10cfae78bc899 inherit pub_methods_classIReader"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>This class is used for square tone playback. </p>
<p>The output format is in the 16 bit format and stereo, the sample rate can be specified. As the two channels both play the same the output could also be mono, but in most cases this will result in having to resample for output, so stereo sound is created directly. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a36bebf2745f784863ba5a8f0fe22f05b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36bebf2745f784863ba5a8f0fe22f05b">&#9670;&nbsp;</a></span>SquareReader()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SquareReader::SquareReader </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>frequency</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="Specification_8h.html#a11249ca544d179e7fa61b2200a092407">SampleRate</a>&#160;</td>
          <td class="paramname"><em>sampleRate</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a new reader. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">frequency</td><td>The frequency of the sine wave. </td></tr>
    <tr><td class="paramname">sampleRate</td><td>The output sample rate. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ab04bd3e0e38cdfba0f109a1149e8258f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab04bd3e0e38cdfba0f109a1149e8258f">&#9670;&nbsp;</a></span>getLength()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int SquareReader::getLength </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns an approximated length of the source in samples. </p>
<dl class="section return"><dt>Returns</dt><dd>The length as sample count. May be negative if unknown. </dd></dl>

<p>Implements <a class="el" href="classIReader.html#a384465b5d988cc802702ae4bdc56ea85">IReader</a>.</p>

</div>
</div>
<a id="aeaa538be5511eb2db6d113232b6f5bbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeaa538be5511eb2db6d113232b6f5bbe">&#9670;&nbsp;</a></span>getPosition()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual int SquareReader::getPosition </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the position of the source as a sample count value. </p>
<dl class="section return"><dt>Returns</dt><dd>The current position in the source. A negative value indicates that the position is unknown. </dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>The value returned doesn't always have to be correct for readers, especially after seeking. </dd></dl>

<p>Implements <a class="el" href="classIReader.html#a47a8f86fd242a02ff626eb506cdb319d">IReader</a>.</p>

</div>
</div>
<a id="a983a405c161cb419e8c205e38924d562"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a983a405c161cb419e8c205e38924d562">&#9670;&nbsp;</a></span>getSpecs()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="structSpecs.html">Specs</a> SquareReader::getSpecs </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the specification of the reader. </p>
<dl class="section return"><dt>Returns</dt><dd>The <a class="el" href="structSpecs.html" title="Specification of a sound source.">Specs</a> structure. </dd></dl>

<p>Implements <a class="el" href="classIReader.html#aac4f3a14d42e5c4280488db98dd771b1">IReader</a>.</p>

</div>
</div>
<a id="a2a77588682af5bf9720027d3026b66de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a77588682af5bf9720027d3026b66de">&#9670;&nbsp;</a></span>isSeekable()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool SquareReader::isSeekable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Tells whether the source provides seeking functionality or not. </p>
<dl class="section warning"><dt>Warning</dt><dd>This doesn't mean that the seeking always has to succeed. </dd></dl>
<dl class="section return"><dt>Returns</dt><dd>Always returns true for readers of buffering types. </dd></dl>

<p>Implements <a class="el" href="classIReader.html#acf13bbdc14e680c21122981f7d3bf6be">IReader</a>.</p>

</div>
</div>
<a id="a1ba7600e36a11180d980d7388d818e35"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ba7600e36a11180d980d7388d818e35">&#9670;&nbsp;</a></span>read()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SquareReader::read </td>
          <td>(</td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>length</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool &amp;&#160;</td>
          <td class="paramname"><em>eos</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="Audaspace_8h.html#aa0798f7ea0975b143a1d9deac8c05d43">sample_t</a> *&#160;</td>
          <td class="paramname"><em>buffer</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Request to read the next length samples out of the source. </p>
<p>The buffer supplied has the needed size. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in,out]</td><td class="paramname">length</td><td>The count of samples that should be read. Shall contain the real count of samples after reading, in case there were only fewer samples available. A smaller value also indicates the end of the reader. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">eos</td><td>End of stream, whether the end is reached or not. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">buffer</td><td>The pointer to the buffer to read into. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classIReader.html#aef6fa21dfb71d3065fb14517bf0f24d5">IReader</a>.</p>

</div>
</div>
<a id="ad711eceadb52a8c7f1bd2e1a59e3d388"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad711eceadb52a8c7f1bd2e1a59e3d388">&#9670;&nbsp;</a></span>seek()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void SquareReader::seek </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>position</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Seeks to a specific position in the source. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">position</td><td>The position to seek for measured in samples. To get from a given time to the samples you simply have to multiply the time value in seconds with the sample rate of the reader. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section warning"><dt>Warning</dt><dd>This may work or not, depending on the actual reader. </dd></dl>

<p>Implements <a class="el" href="classIReader.html#ad9fc74bb6f4c2b1ecc0f75b7118c1458">IReader</a>.</p>

</div>
</div>
<a id="aaf25460cc612bb0652482eceaaf5ad06"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf25460cc612bb0652482eceaaf5ad06">&#9670;&nbsp;</a></span>setFrequency()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SquareReader::setFrequency </td>
          <td>(</td>
          <td class="paramtype">float&#160;</td>
          <td class="paramname"><em>frequency</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the frequency of the wave. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">frequency</td><td>The new frequency in Hertz. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>generator/<a class="el" href="SquareReader_8h_source.html">SquareReader.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>