vectozavr-shooter/SFML-VS32/doc/html/classsf_1_1SoundStream.html

1228 lines
71 KiB
HTML

<!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>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 2.5.1</span>
</div>
</div>
<div id="content">
<!-- Generated by Doxygen 1.8.14 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</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>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1SoundStream.html">SoundStream</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-types">Protected Types</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="classsf_1_1SoundStream-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::SoundStream Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__audio.html">Audio module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p>Abstract base class for streamed audio sources.
<a href="classsf_1_1SoundStream.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="SoundStream_8hpp_source.html">SoundStream.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::SoundStream:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1SoundStream.png" usemap="#sf::SoundStream_map" alt=""/>
<map id="sf::SoundStream_map" name="sf::SoundStream_map">
<area href="classsf_1_1SoundSource.html" title="Base class defining a sound&#39;s properties. " alt="sf::SoundSource" shape="rect" coords="0,56,105,80"/>
<area href="classsf_1_1AlResource.html" title="Base class for classes that require an OpenAL context. " alt="sf::AlResource" shape="rect" coords="0,0,105,24"/>
<area href="classsf_1_1Music.html" title="Streamed music played from an audio file. " alt="sf::Music" shape="rect" coords="0,168,105,192"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Structure defining a chunk of audio data to stream. <a href="structsf_1_1SoundStream_1_1Chunk.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:ac43af72c98c077500b239bc75b812f03"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> { <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03adabb01e8aa85b2f54b344890addf764a">Stopped</a>,
<a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03ac3ca1fcc0394267c9bdbe3dc0a8a7e41">Paused</a>,
<a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03af07bdea9f70ef7606dfc9f955beeee18">Playing</a>
}</td></tr>
<tr class="memdesc:ac43af72c98c077500b239bc75b812f03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enumeration of the sound source states. <a href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">More...</a><br /></td></tr>
<tr class="separator:ac43af72c98c077500b239bc75b812f03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><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:a1fafb9f1ca572d23d7d6a17921860d85"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a1fafb9f1ca572d23d7d6a17921860d85">~SoundStream</a> ()</td></tr>
<tr class="memdesc:a1fafb9f1ca572d23d7d6a17921860d85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#a1fafb9f1ca572d23d7d6a17921860d85">More...</a><br /></td></tr>
<tr class="separator:a1fafb9f1ca572d23d7d6a17921860d85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdc08b69cab5f243d9324940a85a1144"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144">play</a> ()</td></tr>
<tr class="memdesc:afdc08b69cab5f243d9324940a85a1144"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start or resume playing the audio stream. <a href="#afdc08b69cab5f243d9324940a85a1144">More...</a><br /></td></tr>
<tr class="separator:afdc08b69cab5f243d9324940a85a1144"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a932ff181e661503cad288b4bb6fe45ca"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca">pause</a> ()</td></tr>
<tr class="memdesc:a932ff181e661503cad288b4bb6fe45ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Pause the audio stream. <a href="#a932ff181e661503cad288b4bb6fe45ca">More...</a><br /></td></tr>
<tr class="separator:a932ff181e661503cad288b4bb6fe45ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16cc6a0404b32e42c4dce184bb94d0f4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4">stop</a> ()</td></tr>
<tr class="memdesc:a16cc6a0404b32e42c4dce184bb94d0f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop playing the audio stream. <a href="#a16cc6a0404b32e42c4dce184bb94d0f4">More...</a><br /></td></tr>
<tr class="separator:a16cc6a0404b32e42c4dce184bb94d0f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f70933912dd9498f4dc99feefed27f3"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a1f70933912dd9498f4dc99feefed27f3">getChannelCount</a> () const</td></tr>
<tr class="memdesc:a1f70933912dd9498f4dc99feefed27f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the number of channels of the stream. <a href="#a1f70933912dd9498f4dc99feefed27f3">More...</a><br /></td></tr>
<tr class="separator:a1f70933912dd9498f4dc99feefed27f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a7da448dc40d81a33b8dc555fbf0d3fbf">getSampleRate</a> () const</td></tr>
<tr class="memdesc:a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the stream sample rate of the stream. <a href="#a7da448dc40d81a33b8dc555fbf0d3fbf">More...</a><br /></td></tr>
<tr class="separator:a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64a8193ed728da37c115c65de015849f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a64a8193ed728da37c115c65de015849f">getStatus</a> () const</td></tr>
<tr class="memdesc:a64a8193ed728da37c115c65de015849f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current status of the stream (stopped, paused, playing) <a href="#a64a8193ed728da37c115c65de015849f">More...</a><br /></td></tr>
<tr class="separator:a64a8193ed728da37c115c65de015849f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af416a5f84c8750d2acb9821d78bc8646"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#af416a5f84c8750d2acb9821d78bc8646">setPlayingOffset</a> (<a class="el" href="classsf_1_1Time.html">Time</a> timeOffset)</td></tr>
<tr class="memdesc:af416a5f84c8750d2acb9821d78bc8646"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the current playing position of the stream. <a href="#af416a5f84c8750d2acb9821d78bc8646">More...</a><br /></td></tr>
<tr class="separator:af416a5f84c8750d2acb9821d78bc8646"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae288f3c72edbad9cc7ee938ce5b907c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Time.html">Time</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#ae288f3c72edbad9cc7ee938ce5b907c1">getPlayingOffset</a> () const</td></tr>
<tr class="memdesc:ae288f3c72edbad9cc7ee938ce5b907c1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the current playing position of the stream. <a href="#ae288f3c72edbad9cc7ee938ce5b907c1">More...</a><br /></td></tr>
<tr class="separator:ae288f3c72edbad9cc7ee938ce5b907c1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a43fade018ffba7e4f847a9f00b353f3d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a43fade018ffba7e4f847a9f00b353f3d">setLoop</a> (bool loop)</td></tr>
<tr class="memdesc:a43fade018ffba7e4f847a9f00b353f3d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set whether or not the stream should loop after reaching the end. <a href="#a43fade018ffba7e4f847a9f00b353f3d">More...</a><br /></td></tr>
<tr class="separator:a43fade018ffba7e4f847a9f00b353f3d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49d263f9bbaefec4b019bd05fda59b25"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a49d263f9bbaefec4b019bd05fda59b25">getLoop</a> () const</td></tr>
<tr class="memdesc:a49d263f9bbaefec4b019bd05fda59b25"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether or not the stream is in loop mode. <a href="#a49d263f9bbaefec4b019bd05fda59b25">More...</a><br /></td></tr>
<tr class="separator:a49d263f9bbaefec4b019bd05fda59b25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a72a13695ed48b7f7b55e7cd4431f4bb6">setPitch</a> (float pitch)</td></tr>
<tr class="memdesc:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the pitch of the sound. <a href="#a72a13695ed48b7f7b55e7cd4431f4bb6">More...</a><br /></td></tr>
<tr class="separator:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a2f192f2b49fb8e2b82f3498d3663fcc2">setVolume</a> (float volume)</td></tr>
<tr class="memdesc:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the volume of the sound. <a href="#a2f192f2b49fb8e2b82f3498d3663fcc2">More...</a><br /></td></tr>
<tr class="separator:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a0480257ea25d986eba6cc3c1a6f8d7c2">setPosition</a> (float x, float y, float z)</td></tr>
<tr class="memdesc:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the 3D position of the sound in the audio scene. <a href="#a0480257ea25d986eba6cc3c1a6f8d7c2">More...</a><br /></td></tr>
<tr class="separator:a0480257ea25d986eba6cc3c1a6f8d7c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17ba9ed01925395652181a7b2a7d3aef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a17ba9ed01925395652181a7b2a7d3aef">setPosition</a> (const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;position)</td></tr>
<tr class="memdesc:a17ba9ed01925395652181a7b2a7d3aef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the 3D position of the sound in the audio scene. <a href="#a17ba9ed01925395652181a7b2a7d3aef">More...</a><br /></td></tr>
<tr class="separator:a17ba9ed01925395652181a7b2a7d3aef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac478a8b813faf7dd575635b102081d0d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#ac478a8b813faf7dd575635b102081d0d">setRelativeToListener</a> (bool relative)</td></tr>
<tr class="memdesc:ac478a8b813faf7dd575635b102081d0d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Make the sound's position relative to the listener or absolute. <a href="#ac478a8b813faf7dd575635b102081d0d">More...</a><br /></td></tr>
<tr class="separator:ac478a8b813faf7dd575635b102081d0d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a75bbc2c34addc8b25a14edb908508afe"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe">setMinDistance</a> (float distance)</td></tr>
<tr class="memdesc:a75bbc2c34addc8b25a14edb908508afe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the minimum distance of the sound. <a href="#a75bbc2c34addc8b25a14edb908508afe">More...</a><br /></td></tr>
<tr class="separator:a75bbc2c34addc8b25a14edb908508afe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626">setAttenuation</a> (float attenuation)</td></tr>
<tr class="memdesc:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the attenuation factor of the sound. <a href="#aa2adff44cd2f8b4e3c7315d7c2a45626">More...</a><br /></td></tr>
<tr class="separator:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4736acc2c802f927544c9ce52a44a9e4"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4">getPitch</a> () const</td></tr>
<tr class="memdesc:a4736acc2c802f927544c9ce52a44a9e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the pitch of the sound. <a href="#a4736acc2c802f927544c9ce52a44a9e4">More...</a><br /></td></tr>
<tr class="separator:a4736acc2c802f927544c9ce52a44a9e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a04243fb5edf64561689b1d58953fc4ce"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a04243fb5edf64561689b1d58953fc4ce">getVolume</a> () const</td></tr>
<tr class="memdesc:a04243fb5edf64561689b1d58953fc4ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the volume of the sound. <a href="#a04243fb5edf64561689b1d58953fc4ce">More...</a><br /></td></tr>
<tr class="separator:a04243fb5edf64561689b1d58953fc4ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d199521f55550c7a3b2b0f6950dffa1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Vector3.html">Vector3f</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1">getPosition</a> () const</td></tr>
<tr class="memdesc:a8d199521f55550c7a3b2b0f6950dffa1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the 3D position of the sound in the audio scene. <a href="#a8d199521f55550c7a3b2b0f6950dffa1">More...</a><br /></td></tr>
<tr class="separator:a8d199521f55550c7a3b2b0f6950dffa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#adcdb4ef32c2f4481d34aff0b5c31534b">isRelativeToListener</a> () const</td></tr>
<tr class="memdesc:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether the sound's position is relative to the listener or is absolute. <a href="#adcdb4ef32c2f4481d34aff0b5c31534b">More...</a><br /></td></tr>
<tr class="separator:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a605ca7f359ec1c36fcccdcd4696562ac"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac">getMinDistance</a> () const</td></tr>
<tr class="memdesc:a605ca7f359ec1c36fcccdcd4696562ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the minimum distance of the sound. <a href="#a605ca7f359ec1c36fcccdcd4696562ac">More...</a><br /></td></tr>
<tr class="separator:a605ca7f359ec1c36fcccdcd4696562ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9">getAttenuation</a> () const</td></tr>
<tr class="memdesc:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the attenuation factor of the sound. <a href="#a8ad7dafb4f1b4afbc638cebe24f48cc9">More...</a><br /></td></tr>
<tr class="separator:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-types"></a>
Protected Types</h2></td></tr>
<tr class="memitem:a7707214e7cd4ffcf1c123e7bcab4092a"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom">{ <a class="el" href="classsf_1_1SoundStream.html#a7707214e7cd4ffcf1c123e7bcab4092aa2f2c638731fdff0d6fe4e3e82b6f6146">NoLoop</a> = -1
}</td></tr>
<tr class="separator:a7707214e7cd4ffcf1c123e7bcab4092a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:a769d08f4c3c6b4340ef3a838329d2e5c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a769d08f4c3c6b4340ef3a838329d2e5c">SoundStream</a> ()</td></tr>
<tr class="memdesc:a769d08f4c3c6b4340ef3a838329d2e5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#a769d08f4c3c6b4340ef3a838329d2e5c">More...</a><br /></td></tr>
<tr class="separator:a769d08f4c3c6b4340ef3a838329d2e5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c351711198ee1aa77c2fefd3ced4d2c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a9c351711198ee1aa77c2fefd3ced4d2c">initialize</a> (unsigned int channelCount, unsigned int sampleRate)</td></tr>
<tr class="memdesc:a9c351711198ee1aa77c2fefd3ced4d2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Define the audio stream parameters. <a href="#a9c351711198ee1aa77c2fefd3ced4d2c">More...</a><br /></td></tr>
<tr class="separator:a9c351711198ee1aa77c2fefd3ced4d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a968ec024a6e45490962c8a1121cb7c5f"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a968ec024a6e45490962c8a1121cb7c5f">onGetData</a> (<a class="el" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a> &amp;data)=0</td></tr>
<tr class="memdesc:a968ec024a6e45490962c8a1121cb7c5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Request a new chunk of audio samples from the stream source. <a href="#a968ec024a6e45490962c8a1121cb7c5f">More...</a><br /></td></tr>
<tr class="separator:a968ec024a6e45490962c8a1121cb7c5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a907036dd2ca7d3af5ead316e54b75997"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a907036dd2ca7d3af5ead316e54b75997">onSeek</a> (<a class="el" href="classsf_1_1Time.html">Time</a> timeOffset)=0</td></tr>
<tr class="memdesc:a907036dd2ca7d3af5ead316e54b75997"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the current playing position in the stream source. <a href="#a907036dd2ca7d3af5ead316e54b75997">More...</a><br /></td></tr>
<tr class="separator:a907036dd2ca7d3af5ead316e54b75997"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f717d18846f261fc375d71d6c7e41da"><td class="memItemLeft" align="right" valign="top">virtual Int64&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundStream.html#a3f717d18846f261fc375d71d6c7e41da">onLoop</a> ()</td></tr>
<tr class="memdesc:a3f717d18846f261fc375d71d6c7e41da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the current playing position in the stream source to the beginning of the loop. <a href="#a3f717d18846f261fc375d71d6c7e41da">More...</a><br /></td></tr>
<tr class="separator:a3f717d18846f261fc375d71d6c7e41da"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:a0223cef4b1c587e6e1e17b4c92c4479c"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a0223cef4b1c587e6e1e17b4c92c4479c">m_source</a></td></tr>
<tr class="memdesc:a0223cef4b1c587e6e1e17b4c92c4479c"><td class="mdescLeft">&#160;</td><td class="mdescRight">OpenAL source identifier. <a href="#a0223cef4b1c587e6e1e17b4c92c4479c">More...</a><br /></td></tr>
<tr class="separator:a0223cef4b1c587e6e1e17b4c92c4479c"><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>Abstract base class for streamed audio sources. </p>
<p>Unlike audio buffers (see <a class="el" href="classsf_1_1SoundBuffer.html" title="Storage for audio samples defining a sound. ">sf::SoundBuffer</a>), audio streams are never completely loaded in memory.</p>
<p>Instead, the audio data is acquired continuously while the stream is playing. This behavior allows to play a sound with no loading delay, and keeps the memory consumption very low.</p>
<p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment. ">Sound</a> sources that need to be streamed are usually big files (compressed audio musics that would eat hundreds of MB in memory) or files that would take a lot of time to be received (sounds played over the network).</p>
<p><a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources. ">sf::SoundStream</a> is a base class that doesn't care about the stream source, which is left to the derived class. SFML provides a built-in specialization for big files (see <a class="el" href="classsf_1_1Music.html" title="Streamed music played from an audio file. ">sf::Music</a>). No network stream source is provided, but you can write your own by combining this class with the network module.</p>
<p>A derived class has to override two virtual functions: </p><ul>
<li>onGetData fills a new chunk of audio data to be played </li>
<li>onSeek changes the current playing position in the source</li>
</ul>
<p>It is important to note that each <a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources. ">SoundStream</a> is played in its own separate thread, so that the streaming loop doesn't block the rest of the program. In particular, the OnGetData and OnSeek virtual functions may sometimes be called from this separate thread. It is important to keep this in mind, because you may have to take care of synchronization issues if you share data between threads.</p>
<p>Usage example: </p><div class="fragment"><div class="line"><span class="keyword">class </span>CustomStream : <span class="keyword">public</span> <a class="code" href="classsf_1_1SoundStream.html">sf::SoundStream</a></div><div class="line">{</div><div class="line"><span class="keyword">public</span>:</div><div class="line"></div><div class="line"> <span class="keywordtype">bool</span> open(<span class="keyword">const</span> std::string&amp; location)</div><div class="line"> {</div><div class="line"> <span class="comment">// Open the source and get audio settings</span></div><div class="line"> ...</div><div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelCount = ...;</div><div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate = ...;</div><div class="line"></div><div class="line"> <span class="comment">// Initialize the stream -- important!</span></div><div class="line"> <a class="code" href="classsf_1_1SoundStream.html#a9c351711198ee1aa77c2fefd3ced4d2c">initialize</a>(channelCount, sampleRate);</div><div class="line"> }</div><div class="line"></div><div class="line"><span class="keyword">private</span>:</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classsf_1_1SoundStream.html#a968ec024a6e45490962c8a1121cb7c5f">onGetData</a>(Chunk&amp; data)</div><div class="line"> {</div><div class="line"> <span class="comment">// Fill the chunk with audio data from the stream source</span></div><div class="line"> <span class="comment">// (note: must not be empty if you want to continue playing)</span></div><div class="line"> data.samples = ...;</div><div class="line"> data.sampleCount = ...;</div><div class="line"></div><div class="line"> <span class="comment">// Return true to continue playing</span></div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"> }</div><div class="line"></div><div class="line"> <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classsf_1_1SoundStream.html#a907036dd2ca7d3af5ead316e54b75997">onSeek</a>(Uint32 timeOffset)</div><div class="line"> {</div><div class="line"> <span class="comment">// Change the current position in the stream source</span></div><div class="line"> ...</div><div class="line"> }</div><div class="line">}</div><div class="line"></div><div class="line"><span class="comment">// Usage</span></div><div class="line">CustomStream stream;</div><div class="line">stream.open(<span class="stringliteral">&quot;path/to/stream&quot;</span>);</div><div class="line">stream.play();</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Music.html" title="Streamed music played from an audio file. ">sf::Music</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="SoundStream_8hpp_source.html#l00045">45</a> of file <a class="el" href="SoundStream_8hpp_source.html">SoundStream.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a7707214e7cd4ffcf1c123e7bcab4092a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7707214e7cd4ffcf1c123e7bcab4092a">&#9670;&nbsp;</a></span>anonymous enum</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">anonymous enum</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a7707214e7cd4ffcf1c123e7bcab4092aa2f2c638731fdff0d6fe4e3e82b6f6146"></a>NoLoop&#160;</td><td class="fielddoc"><p>"Invalid" endSeeks value, telling us to continue uninterrupted </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="SoundStream_8hpp_source.html#l00183">183</a> of file <a class="el" href="SoundStream_8hpp_source.html">SoundStream.hpp</a>.</p>
</div>
</div>
<a id="ac43af72c98c077500b239bc75b812f03"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac43af72c98c077500b239bc75b812f03">&#9670;&nbsp;</a></span>Status</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">sf::SoundSource::Status</a></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Enumeration of the sound source states. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03adabb01e8aa85b2f54b344890addf764a"></a>Stopped&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment. ">Sound</a> is not playing. </p>
</td></tr>
<tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03ac3ca1fcc0394267c9bdbe3dc0a8a7e41"></a>Paused&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment. ">Sound</a> is paused. </p>
</td></tr>
<tr><td class="fieldname"><a id="ac43af72c98c077500b239bc75b812f03af07bdea9f70ef7606dfc9f955beeee18"></a>Playing&#160;</td><td class="fielddoc"><p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment. ">Sound</a> is playing. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00050">50</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a1fafb9f1ca572d23d7d6a17921860d85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fafb9f1ca572d23d7d6a17921860d85">&#9670;&nbsp;</a></span>~SoundStream()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual sf::SoundStream::~SoundStream </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>Destructor. </p>
</div>
</div>
<a id="a769d08f4c3c6b4340ef3a838329d2e5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a769d08f4c3c6b4340ef3a838329d2e5c">&#9670;&nbsp;</a></span>SoundStream()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sf::SoundStream::SoundStream </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>This constructor is only meant to be called by derived classes. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8ad7dafb4f1b4afbc638cebe24f48cc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ad7dafb4f1b4afbc638cebe24f48cc9">&#9670;&nbsp;</a></span>getAttenuation()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float sf::SoundSource::getAttenuation </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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the attenuation factor of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Attenuation factor of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound. ">setAttenuation</a>, <a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound. ">getMinDistance</a> </dd></dl>
</div>
</div>
<a id="a1f70933912dd9498f4dc99feefed27f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f70933912dd9498f4dc99feefed27f3">&#9670;&nbsp;</a></span>getChannelCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int sf::SoundStream::getChannelCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the number of channels of the stream. </p>
<p>1 channel means a mono sound, 2 means stereo, etc.</p>
<dl class="section return"><dt>Returns</dt><dd>Number of channels </dd></dl>
</div>
</div>
<a id="a49d263f9bbaefec4b019bd05fda59b25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49d263f9bbaefec4b019bd05fda59b25">&#9670;&nbsp;</a></span>getLoop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::SoundStream::getLoop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether or not the stream is in loop mode. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the stream is looping, false otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#a43fade018ffba7e4f847a9f00b353f3d" title="Set whether or not the stream should loop after reaching the end. ">setLoop</a> </dd></dl>
</div>
</div>
<a id="a605ca7f359ec1c36fcccdcd4696562ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a605ca7f359ec1c36fcccdcd4696562ac">&#9670;&nbsp;</a></span>getMinDistance()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float sf::SoundSource::getMinDistance </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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the minimum distance of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Minimum distance of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound. ">setMinDistance</a>, <a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound. ">getAttenuation</a> </dd></dl>
</div>
</div>
<a id="a4736acc2c802f927544c9ce52a44a9e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4736acc2c802f927544c9ce52a44a9e4">&#9670;&nbsp;</a></span>getPitch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float sf::SoundSource::getPitch </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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the pitch of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Pitch of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a72a13695ed48b7f7b55e7cd4431f4bb6" title="Set the pitch of the sound. ">setPitch</a> </dd></dl>
</div>
</div>
<a id="ae288f3c72edbad9cc7ee938ce5b907c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae288f3c72edbad9cc7ee938ce5b907c1">&#9670;&nbsp;</a></span>getPlayingOffset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1Time.html">Time</a> sf::SoundStream::getPlayingOffset </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the current playing position of the stream. </p>
<dl class="section return"><dt>Returns</dt><dd>Current playing position, from the beginning of the stream</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#af416a5f84c8750d2acb9821d78bc8646" title="Change the current playing position of the stream. ">setPlayingOffset</a> </dd></dl>
</div>
</div>
<a id="a8d199521f55550c7a3b2b0f6950dffa1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d199521f55550c7a3b2b0f6950dffa1">&#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"><a class="el" href="classsf_1_1Vector3.html">Vector3f</a> sf::SoundSource::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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the 3D position of the sound in the audio scene. </p>
<dl class="section return"><dt>Returns</dt><dd>Position of the sound</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a0480257ea25d986eba6cc3c1a6f8d7c2" title="Set the 3D position of the sound in the audio scene. ">setPosition</a> </dd></dl>
</div>
</div>
<a id="a7da448dc40d81a33b8dc555fbf0d3fbf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7da448dc40d81a33b8dc555fbf0d3fbf">&#9670;&nbsp;</a></span>getSampleRate()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int sf::SoundStream::getSampleRate </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the stream sample rate of the stream. </p>
<p>The sample rate is the number of audio samples played per second. The higher, the better the quality.</p>
<dl class="section return"><dt>Returns</dt><dd>Sample rate, in number of samples per second </dd></dl>
</div>
</div>
<a id="a64a8193ed728da37c115c65de015849f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64a8193ed728da37c115c65de015849f">&#9670;&nbsp;</a></span>getStatus()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> sf::SoundStream::getStatus </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>Get the current status of the stream (stopped, paused, playing) </p>
<dl class="section return"><dt>Returns</dt><dd>Current status </dd></dl>
<p>Reimplemented from <a class="el" href="classsf_1_1SoundSource.html#aa8d313c31b968159582a999aa66e5ed7">sf::SoundSource</a>.</p>
</div>
</div>
<a id="a04243fb5edf64561689b1d58953fc4ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a04243fb5edf64561689b1d58953fc4ce">&#9670;&nbsp;</a></span>getVolume()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">float sf::SoundSource::getVolume </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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the volume of the sound. </p>
<dl class="section return"><dt>Returns</dt><dd>Volume of the sound, in the range [0, 100]</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a2f192f2b49fb8e2b82f3498d3663fcc2" title="Set the volume of the sound. ">setVolume</a> </dd></dl>
</div>
</div>
<a id="a9c351711198ee1aa77c2fefd3ced4d2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c351711198ee1aa77c2fefd3ced4d2c">&#9670;&nbsp;</a></span>initialize()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::initialize </td>
<td>(</td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>channelCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>sampleRate</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">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Define the audio stream parameters. </p>
<p>This function must be called by derived classes as soon as they know the audio settings of the stream to play. Any attempt to manipulate the stream (<a class="el" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144" title="Start or resume playing the audio stream. ">play()</a>, ...) before calling this function will fail. It can be called multiple times if the settings of the audio stream change, but only when the stream is stopped.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">channelCount</td><td>Number of channels of the stream </td></tr>
<tr><td class="paramname">sampleRate</td><td>Sample rate, in samples per second </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="adcdb4ef32c2f4481d34aff0b5c31534b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcdb4ef32c2f4481d34aff0b5c31534b">&#9670;&nbsp;</a></span>isRelativeToListener()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool sf::SoundSource::isRelativeToListener </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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether the sound's position is relative to the listener or is absolute. </p>
<dl class="section return"><dt>Returns</dt><dd>True if the position is relative, false if it's absolute</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#ac478a8b813faf7dd575635b102081d0d" title="Make the sound&#39;s position relative to the listener or absolute. ">setRelativeToListener</a> </dd></dl>
</div>
</div>
<a id="a968ec024a6e45490962c8a1121cb7c5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a968ec024a6e45490962c8a1121cb7c5f">&#9670;&nbsp;</a></span>onGetData()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool sf::SoundStream::onGetData </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a> &amp;&#160;</td>
<td class="paramname"><em>data</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Request a new chunk of audio samples from the stream source. </p>
<p>This function must be overridden by derived classes to provide the audio samples to play. It is called continuously by the streaming loop, in a separate thread. The source can choose to stop the streaming loop at any time, by returning false to the caller. If you return true (i.e. continue streaming) it is important that the returned array of samples is not empty; this would stop the stream due to an internal limitation.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">data</td><td><a class="el" href="structsf_1_1SoundStream_1_1Chunk.html" title="Structure defining a chunk of audio data to stream. ">Chunk</a> of data to fill</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True to continue playback, false to stop </dd></dl>
<p>Implemented in <a class="el" href="classsf_1_1Music.html#aca1bcb4e5d56a854133e74bd86374463">sf::Music</a>.</p>
</div>
</div>
<a id="a3f717d18846f261fc375d71d6c7e41da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f717d18846f261fc375d71d6c7e41da">&#9670;&nbsp;</a></span>onLoop()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual Int64 sf::SoundStream::onLoop </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Change the current playing position in the stream source to the beginning of the loop. </p>
<p>This function can be overridden by derived classes to allow implementation of custom loop points. Otherwise, it just calls onSeek(Time::Zero) and returns 0.</p>
<dl class="section return"><dt>Returns</dt><dd>The seek position after looping (or -1 if there's no loop) </dd></dl>
<p>Reimplemented in <a class="el" href="classsf_1_1Music.html#aa68a64bdaf5d16e9ed64f202f5c45e03">sf::Music</a>.</p>
</div>
</div>
<a id="a907036dd2ca7d3af5ead316e54b75997"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a907036dd2ca7d3af5ead316e54b75997">&#9670;&nbsp;</a></span>onSeek()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void sf::SoundStream::onSeek </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1Time.html">Time</a>&#160;</td>
<td class="paramname"><em>timeOffset</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Change the current playing position in the stream source. </p>
<p>This function must be overridden by derived classes to allow random seeking into the stream source.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">timeOffset</td><td>New playing position, relative to the beginning of the stream </td></tr>
</table>
</dd>
</dl>
<p>Implemented in <a class="el" href="classsf_1_1Music.html#a15119cc0419c16bb334fa0698699c02e">sf::Music</a>.</p>
</div>
</div>
<a id="a932ff181e661503cad288b4bb6fe45ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a932ff181e661503cad288b4bb6fe45ca">&#9670;&nbsp;</a></span>pause()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::pause </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>Pause the audio stream. </p>
<p>This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144" title="Start or resume playing the audio stream. ">play</a>, <a class="el" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4" title="Stop playing the audio stream. ">stop</a> </dd></dl>
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba">sf::SoundSource</a>.</p>
</div>
</div>
<a id="afdc08b69cab5f243d9324940a85a1144"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdc08b69cab5f243d9324940a85a1144">&#9670;&nbsp;</a></span>play()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::play </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>Start or resume playing the audio stream. </p>
<p>This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from the beginning if it was already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca" title="Pause the audio stream. ">pause</a>, <a class="el" href="classsf_1_1SoundStream.html#a16cc6a0404b32e42c4dce184bb94d0f4" title="Stop playing the audio stream. ">stop</a> </dd></dl>
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a6e1bbb1f247ed8743faf3b1ed6f2bc21">sf::SoundSource</a>.</p>
</div>
</div>
<a id="aa2adff44cd2f8b4e3c7315d7c2a45626"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2adff44cd2f8b4e3c7315d7c2a45626">&#9670;&nbsp;</a></span>setAttenuation()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setAttenuation </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>attenuation</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the attenuation factor of the sound. </p>
<p>The attenuation is a multiplicative factor which makes the sound more or less loud according to its distance from the listener. An attenuation of 0 will produce a non-attenuated sound, i.e. its volume will always be the same whether it is heard from near or from far. On the other hand, an attenuation value such as 100 will make the sound fade out very quickly as it gets further from the listener. The default value of the attenuation is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">attenuation</td><td>New attenuation factor of the sound</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound. ">getAttenuation</a>, <a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound. ">setMinDistance</a> </dd></dl>
</div>
</div>
<a id="a43fade018ffba7e4f847a9f00b353f3d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43fade018ffba7e4f847a9f00b353f3d">&#9670;&nbsp;</a></span>setLoop()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::setLoop </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>loop</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set whether or not the stream should loop after reaching the end. </p>
<p>If set, the stream will restart from beginning after reaching the end and so on, until it is stopped or setLoop(false) is called. The default looping state for streams is false.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">loop</td><td>True to play in loop, false to play once</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#a49d263f9bbaefec4b019bd05fda59b25" title="Tell whether or not the stream is in loop mode. ">getLoop</a> </dd></dl>
</div>
</div>
<a id="a75bbc2c34addc8b25a14edb908508afe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a75bbc2c34addc8b25a14edb908508afe">&#9670;&nbsp;</a></span>setMinDistance()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setMinDistance </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>distance</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the minimum distance of the sound. </p>
<p>The "minimum distance" of a sound is the maximum distance at which it is heard at its maximum volume. Further than the minimum distance, it will start to fade out according to its attenuation factor. A value of 0 ("inside the head
of the listener") is an invalid value and is forbidden. The default value of the minimum distance is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">distance</td><td>New minimum distance of the sound</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound. ">getMinDistance</a>, <a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound. ">setAttenuation</a> </dd></dl>
</div>
</div>
<a id="a72a13695ed48b7f7b55e7cd4431f4bb6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a72a13695ed48b7f7b55e7cd4431f4bb6">&#9670;&nbsp;</a></span>setPitch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setPitch </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>pitch</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the pitch of the sound. </p>
<p>The pitch represents the perceived fundamental frequency of a sound; thus you can make a sound more acute or grave by changing its pitch. A side effect of changing the pitch is to modify the playing speed of the sound as well. The default value for the pitch is 1.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">pitch</td><td>New pitch to apply to the sound</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4" title="Get the pitch of the sound. ">getPitch</a> </dd></dl>
</div>
</div>
<a id="af416a5f84c8750d2acb9821d78bc8646"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af416a5f84c8750d2acb9821d78bc8646">&#9670;&nbsp;</a></span>setPlayingOffset()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::setPlayingOffset </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1Time.html">Time</a>&#160;</td>
<td class="paramname"><em>timeOffset</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Change the current playing position of the stream. </p>
<p>The playing position can be changed when the stream is either paused or playing. Changing the playing position when the stream is stopped has no effect, since playing the stream would reset its position.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">timeOffset</td><td>New playing position, from the beginning of the stream</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#ae288f3c72edbad9cc7ee938ce5b907c1" title="Get the current playing position of the stream. ">getPlayingOffset</a> </dd></dl>
</div>
</div>
<a id="a0480257ea25d986eba6cc3c1a6f8d7c2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0480257ea25d986eba6cc3c1a6f8d7c2">&#9670;&nbsp;</a></span>setPosition() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setPosition </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>x</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>y</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>z</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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the 3D position of the sound in the audio scene. </p>
<p>Only sounds with one channel (mono sounds) can be spatialized. The default position of a sound is (0, 0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">x</td><td>X coordinate of the position of the sound in the scene </td></tr>
<tr><td class="paramname">y</td><td>Y coordinate of the position of the sound in the scene </td></tr>
<tr><td class="paramname">z</td><td>Z coordinate of the position of the sound in the scene</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1" title="Get the 3D position of the sound in the audio scene. ">getPosition</a> </dd></dl>
</div>
</div>
<a id="a17ba9ed01925395652181a7b2a7d3aef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17ba9ed01925395652181a7b2a7d3aef">&#9670;&nbsp;</a></span>setPosition() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setPosition </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vector3.html">Vector3f</a> &amp;&#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">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the 3D position of the sound in the audio scene. </p>
<p>Only sounds with one channel (mono sounds) can be spatialized. The default position of a sound is (0, 0, 0).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">position</td><td>Position of the sound in the scene</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a8d199521f55550c7a3b2b0f6950dffa1" title="Get the 3D position of the sound in the audio scene. ">getPosition</a> </dd></dl>
</div>
</div>
<a id="ac478a8b813faf7dd575635b102081d0d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac478a8b813faf7dd575635b102081d0d">&#9670;&nbsp;</a></span>setRelativeToListener()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setRelativeToListener </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>relative</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Make the sound's position relative to the listener or absolute. </p>
<p>Making a sound relative to the listener will ensure that it will always be played the same way regardless of the position of the listener. This can be useful for non-spatialized sounds, sounds that are produced by the listener, or sounds attached to it. The default value is false (position is absolute).</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">relative</td><td>True to set the position relative, false to set it absolute</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#adcdb4ef32c2f4481d34aff0b5c31534b" title="Tell whether the sound&#39;s position is relative to the listener or is absolute. ">isRelativeToListener</a> </dd></dl>
</div>
</div>
<a id="a2f192f2b49fb8e2b82f3498d3663fcc2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f192f2b49fb8e2b82f3498d3663fcc2">&#9670;&nbsp;</a></span>setVolume()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundSource::setVolume </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>volume</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the volume of the sound. </p>
<p>The volume is a value between 0 (mute) and 100 (full volume). The default value for the volume is 100.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">volume</td><td>Volume of the sound</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundSource.html#a04243fb5edf64561689b1d58953fc4ce" title="Get the volume of the sound. ">getVolume</a> </dd></dl>
</div>
</div>
<a id="a16cc6a0404b32e42c4dce184bb94d0f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16cc6a0404b32e42c4dce184bb94d0f4">&#9670;&nbsp;</a></span>stop()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void sf::SoundStream::stop </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>Stop playing the audio stream. </p>
<p>This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike <a class="el" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca" title="Pause the audio stream. ">pause()</a>).</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1SoundStream.html#afdc08b69cab5f243d9324940a85a1144" title="Start or resume playing the audio stream. ">play</a>, <a class="el" href="classsf_1_1SoundStream.html#a932ff181e661503cad288b4bb6fe45ca" title="Pause the audio stream. ">pause</a> </dd></dl>
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a06501a25b12376befcc7ee1ed4865fda">sf::SoundSource</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="a0223cef4b1c587e6e1e17b4c92c4479c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0223cef4b1c587e6e1e17b4c92c4479c">&#9670;&nbsp;</a></span>m_source</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">unsigned int sf::SoundSource::m_source</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">inherited</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>OpenAL source identifier. </p>
<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00309">309</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="SoundStream_8hpp_source.html">SoundStream.hpp</a></li>
</ul>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>