<!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: VolumeSound 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  <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&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&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> | <a href="classVolumeSound-members.html">List of all members</a> </div> <div class="headertitle"> <div class="title">VolumeSound Class Reference</div> </div> </div><!--header--> <div class="contents"> <p>This class allows to create a sound with its own volume. <a href="classVolumeSound.html#details">More...</a></p> <p><code>#include <<a class="el" href="VolumeSound_8h_source.html">VolumeSound.h</a>></code></p> <div class="dynheader"> Inheritance diagram for VolumeSound:</div> <div class="dyncontent"> <div class="center"><img src="classVolumeSound__inherit__graph.png" border="0" usemap="#VolumeSound_inherit__map" alt="Inheritance graph"/></div> <map name="VolumeSound_inherit__map" id="VolumeSound_inherit__map"> <area shape="rect" title="This class allows to create a sound with its own volume." alt="" coords="5,80,113,107"/> <area shape="rect" href="classISound.html" title="This class represents a type of sound source and saves the necessary values for it." alt="" coords="27,5,92,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:a3a1ab18022edf02263afdd69e12604f3"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classVolumeSound.html#a3a1ab18022edf02263afdd69e12604f3">VolumeSound</a> (std::shared_ptr< <a class="el" href="classISound.html">ISound</a> > sound, std::shared_ptr< <a class="el" href="classVolumeStorage.html">VolumeStorage</a> > volumeStorage)</td></tr> <tr class="memdesc:a3a1ab18022edf02263afdd69e12604f3"><td class="mdescLeft"> </td><td class="mdescRight">Creates a new <a class="el" href="classVolumeSound.html" title="This class allows to create a sound with its own volume.">VolumeSound</a>. <a href="#a3a1ab18022edf02263afdd69e12604f3">More...</a><br /></td></tr> <tr class="separator:a3a1ab18022edf02263afdd69e12604f3"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a81f8107411d018058f5a33334b701f71"><td class="memItemLeft" align="right" valign="top">virtual std::shared_ptr< <a class="el" href="classIReader.html">IReader</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVolumeSound.html#a81f8107411d018058f5a33334b701f71">createReader</a> ()</td></tr> <tr class="memdesc:a81f8107411d018058f5a33334b701f71"><td class="mdescLeft"> </td><td class="mdescRight">Creates a reader for playback of the sound source. <a href="#a81f8107411d018058f5a33334b701f71">More...</a><br /></td></tr> <tr class="separator:a81f8107411d018058f5a33334b701f71"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a2560a39f868a69fa74d9285ceb5508ff"><td class="memItemLeft" align="right" valign="top">std::shared_ptr< <a class="el" href="classVolumeStorage.html">VolumeStorage</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classVolumeSound.html#a2560a39f868a69fa74d9285ceb5508ff">getSharedVolume</a> ()</td></tr> <tr class="memdesc:a2560a39f868a69fa74d9285ceb5508ff"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the shared volume of this sound. <a href="#a2560a39f868a69fa74d9285ceb5508ff">More...</a><br /></td></tr> <tr class="separator:a2560a39f868a69fa74d9285ceb5508ff"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a3b417b0ed15e68654c7622421fa89e4a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classVolumeSound.html#a3b417b0ed15e68654c7622421fa89e4a">setSharedVolume</a> (std::shared_ptr< <a class="el" href="classVolumeStorage.html">VolumeStorage</a> > volumeStorage)</td></tr> <tr class="memdesc:a3b417b0ed15e68654c7622421fa89e4a"><td class="mdescLeft"> </td><td class="mdescRight">Changes the shared volume of this sound, it'll only affect newly created readers. <a href="#a3b417b0ed15e68654c7622421fa89e4a">More...</a><br /></td></tr> <tr class="separator:a3b417b0ed15e68654c7622421fa89e4a"><td class="memSeparator" colspan="2"> </td></tr> <tr class="inherit_header pub_methods_classISound"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classISound')"><img src="closed.png" alt="-"/> Public Member Functions inherited from <a class="el" href="classISound.html">ISound</a></td></tr> <tr class="memitem:ad968d59f5fdb16f050b3c74108c693b5 inherit pub_methods_classISound"><td class="memItemLeft" align="right" valign="top"><a id="ad968d59f5fdb16f050b3c74108c693b5"></a> virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classISound.html#ad968d59f5fdb16f050b3c74108c693b5">~ISound</a> ()</td></tr> <tr class="memdesc:ad968d59f5fdb16f050b3c74108c693b5 inherit pub_methods_classISound"><td class="mdescLeft"> </td><td class="mdescRight">Destroys the sound. <br /></td></tr> <tr class="separator:ad968d59f5fdb16f050b3c74108c693b5 inherit pub_methods_classISound"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2> <div class="textblock"><p>This class allows to create a sound with its own volume. </p> </div><h2 class="groupheader">Constructor & Destructor Documentation</h2> <a id="a3a1ab18022edf02263afdd69e12604f3"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3a1ab18022edf02263afdd69e12604f3">◆ </a></span>VolumeSound()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">VolumeSound::VolumeSound </td> <td>(</td> <td class="paramtype">std::shared_ptr< <a class="el" href="classISound.html">ISound</a> > </td> <td class="paramname"><em>sound</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">std::shared_ptr< <a class="el" href="classVolumeStorage.html">VolumeStorage</a> > </td> <td class="paramname"><em>volumeStorage</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div><div class="memdoc"> <p>Creates a new <a class="el" href="classVolumeSound.html" title="This class allows to create a sound with its own volume.">VolumeSound</a>. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">sound</td><td>The sound in which shall have its own volume. </td></tr> <tr><td class="paramname">volumeStorage</td><td>A shared pointer to a <a class="el" href="classVolumeStorage.html" title="This class stores a volume value and allows to change if for a number of sounds in one go.">VolumeStorage</a> object. It allows to change the volume of various sound in one go. </td></tr> </table> </dd> </dl> </div> </div> <h2 class="groupheader">Member Function Documentation</h2> <a id="a81f8107411d018058f5a33334b701f71"></a> <h2 class="memtitle"><span class="permalink"><a href="#a81f8107411d018058f5a33334b701f71">◆ </a></span>createReader()</h2> <div class="memitem"> <div class="memproto"> <table class="mlabels"> <tr> <td class="mlabels-left"> <table class="memname"> <tr> <td class="memname">virtual std::shared_ptr<<a class="el" href="classIReader.html">IReader</a>> VolumeSound::createReader </td> <td>(</td> <td class="paramname"></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>Creates a reader for playback of the sound source. </p> <dl class="section return"><dt>Returns</dt><dd>A pointer to an <a class="el" href="classIReader.html" title="This class represents a sound source as stream or as buffer which can be read for example by another ...">IReader</a> object or nullptr if there has been an error. </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>An exception may be thrown if there has been a more unexpected error during reader creation. </td></tr> </table> </dd> </dl> <p>Implements <a class="el" href="classISound.html#a194d09ea3b22f1cb0a49b89cfcf02d63">ISound</a>.</p> </div> </div> <a id="a2560a39f868a69fa74d9285ceb5508ff"></a> <h2 class="memtitle"><span class="permalink"><a href="#a2560a39f868a69fa74d9285ceb5508ff">◆ </a></span>getSharedVolume()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::shared_ptr<<a class="el" href="classVolumeStorage.html">VolumeStorage</a>> VolumeSound::getSharedVolume </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Retrieves the shared volume of this sound. </p> <dl class="section return"><dt>Returns</dt><dd>A shared pointer to the <a class="el" href="classVolumeStorage.html" title="This class stores a volume value and allows to change if for a number of sounds in one go.">VolumeStorage</a> object that this sound is using. </dd></dl> </div> </div> <a id="a3b417b0ed15e68654c7622421fa89e4a"></a> <h2 class="memtitle"><span class="permalink"><a href="#a3b417b0ed15e68654c7622421fa89e4a">◆ </a></span>setSharedVolume()</h2> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void VolumeSound::setSharedVolume </td> <td>(</td> <td class="paramtype">std::shared_ptr< <a class="el" href="classVolumeStorage.html">VolumeStorage</a> > </td> <td class="paramname"><em>volumeStorage</em></td><td>)</td> <td></td> </tr> </table> </div><div class="memdoc"> <p>Changes the shared volume of this sound, it'll only affect newly created readers. </p> <dl class="params"><dt>Parameters</dt><dd> <table class="params"> <tr><td class="paramname">volumeStorage</td><td>A shared pointer to the new <a class="el" href="classVolumeStorage.html" title="This class stores a volume value and allows to change if for a number of sounds in one go.">VolumeStorage</a> object. </td></tr> </table> </dd> </dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>fx/<a class="el" href="VolumeSound_8h_source.html">VolumeSound.h</a></li> </ul> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.15 </small></address> </body> </html>