Sophie

Sophie

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

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: SndFileReader 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="classSndFileReader-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SndFileReader Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>This class reads a sound file via libsndfile.  
 <a href="classSndFileReader.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="SndFileReader_8h_source.html">SndFileReader.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for SndFileReader:</div>
<div class="dyncontent">
<div class="center"><img src="classSndFileReader__inherit__graph.png" border="0" usemap="#SndFileReader_inherit__map" alt="Inheritance graph"/></div>
<map name="SndFileReader_inherit__map" id="SndFileReader_inherit__map">
<area shape="rect"  title="This class reads a sound file via libsndfile." alt="" coords="5,80,116,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="26,5,95,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:a2ef1184103c1027cccdefe71f0f1a01f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#a2ef1184103c1027cccdefe71f0f1a01f">SndFileReader</a> (std::string filename)</td></tr>
<tr class="memdesc:a2ef1184103c1027cccdefe71f0f1a01f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new reader.  <a href="#a2ef1184103c1027cccdefe71f0f1a01f">More...</a><br /></td></tr>
<tr class="separator:a2ef1184103c1027cccdefe71f0f1a01f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1107532e2c56588f0187603f83f5070"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#ad1107532e2c56588f0187603f83f5070">SndFileReader</a> (std::shared_ptr&lt; <a class="el" href="classBuffer.html">Buffer</a> &gt; buffer)</td></tr>
<tr class="memdesc:ad1107532e2c56588f0187603f83f5070"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new reader.  <a href="#ad1107532e2c56588f0187603f83f5070">More...</a><br /></td></tr>
<tr class="separator:ad1107532e2c56588f0187603f83f5070"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d815d42d4e5971e819ef856ce70b890"><td class="memItemLeft" align="right" valign="top"><a id="a0d815d42d4e5971e819ef856ce70b890"></a>
virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#a0d815d42d4e5971e819ef856ce70b890">~SndFileReader</a> ()</td></tr>
<tr class="memdesc:a0d815d42d4e5971e819ef856ce70b890"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the reader and closes the file. <br /></td></tr>
<tr class="separator:a0d815d42d4e5971e819ef856ce70b890"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4251a9f6a28662f361ae0c37781b7cc"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#ae4251a9f6a28662f361ae0c37781b7cc">isSeekable</a> () const</td></tr>
<tr class="memdesc:ae4251a9f6a28662f361ae0c37781b7cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells whether the source provides seeking functionality or not.  <a href="#ae4251a9f6a28662f361ae0c37781b7cc">More...</a><br /></td></tr>
<tr class="separator:ae4251a9f6a28662f361ae0c37781b7cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af424cfd5cf33372971ca5c1a5119176a"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#af424cfd5cf33372971ca5c1a5119176a">seek</a> (int position)</td></tr>
<tr class="memdesc:af424cfd5cf33372971ca5c1a5119176a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Seeks to a specific position in the source.  <a href="#af424cfd5cf33372971ca5c1a5119176a">More...</a><br /></td></tr>
<tr class="separator:af424cfd5cf33372971ca5c1a5119176a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0b01ccd178b43834eef804f6df695979"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#a0b01ccd178b43834eef804f6df695979">getLength</a> () const</td></tr>
<tr class="memdesc:a0b01ccd178b43834eef804f6df695979"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns an approximated length of the source in samples.  <a href="#a0b01ccd178b43834eef804f6df695979">More...</a><br /></td></tr>
<tr class="separator:a0b01ccd178b43834eef804f6df695979"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab7522195d194d272f18f7cc072fd4bb"><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#aab7522195d194d272f18f7cc072fd4bb">getPosition</a> () const</td></tr>
<tr class="memdesc:aab7522195d194d272f18f7cc072fd4bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the position of the source as a sample count value.  <a href="#aab7522195d194d272f18f7cc072fd4bb">More...</a><br /></td></tr>
<tr class="separator:aab7522195d194d272f18f7cc072fd4bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac22963b1bb5a09b656436dec4ab95093"><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="classSndFileReader.html#ac22963b1bb5a09b656436dec4ab95093">getSpecs</a> () const</td></tr>
<tr class="memdesc:ac22963b1bb5a09b656436dec4ab95093"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the specification of the reader.  <a href="#ac22963b1bb5a09b656436dec4ab95093">More...</a><br /></td></tr>
<tr class="separator:ac22963b1bb5a09b656436dec4ab95093"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a53ee13a5bebc63fb7cda83552fe1c32f"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classSndFileReader.html#a53ee13a5bebc63fb7cda83552fe1c32f">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:a53ee13a5bebc63fb7cda83552fe1c32f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request to read the next length samples out of the source.  <a href="#a53ee13a5bebc63fb7cda83552fe1c32f">More...</a><br /></td></tr>
<tr class="separator:a53ee13a5bebc63fb7cda83552fe1c32f"><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 reads a sound file via libsndfile. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a2ef1184103c1027cccdefe71f0f1a01f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2ef1184103c1027cccdefe71f0f1a01f">&#9670;&nbsp;</a></span>SndFileReader() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SndFileReader::SndFileReader </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>filename</em></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">filename</td><td>The path to the file to be read. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classException.html" title="The Exception class is the general exception base class.">Exception</a></td><td>Thrown if the file specified does not exist or cannot be read with libsndfile. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ad1107532e2c56588f0187603f83f5070"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1107532e2c56588f0187603f83f5070">&#9670;&nbsp;</a></span>SndFileReader() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SndFileReader::SndFileReader </td>
          <td>(</td>
          <td class="paramtype">std::shared_ptr&lt; <a class="el" href="classBuffer.html">Buffer</a> &gt;&#160;</td>
          <td class="paramname"><em>buffer</em></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">buffer</td><td>The buffer to read from. </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classException.html" title="The Exception class is the general exception base class.">Exception</a></td><td>Thrown if the buffer specified cannot be read with libsndfile. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a0b01ccd178b43834eef804f6df695979"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0b01ccd178b43834eef804f6df695979">&#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 SndFileReader::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="aab7522195d194d272f18f7cc072fd4bb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab7522195d194d272f18f7cc072fd4bb">&#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 SndFileReader::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="ac22963b1bb5a09b656436dec4ab95093"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac22963b1bb5a09b656436dec4ab95093">&#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> SndFileReader::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="ae4251a9f6a28662f361ae0c37781b7cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4251a9f6a28662f361ae0c37781b7cc">&#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 SndFileReader::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="a53ee13a5bebc63fb7cda83552fe1c32f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a53ee13a5bebc63fb7cda83552fe1c32f">&#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 SndFileReader::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="af424cfd5cf33372971ca5c1a5119176a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af424cfd5cf33372971ca5c1a5119176a">&#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 SndFileReader::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>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>libsndfile/<a class="el" href="SndFileReader_8h_source.html">SndFileReader.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>