1598 lines
96 KiB
HTML
1598 lines
96 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;charset=UTF-8" />
|
|
<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>
|
|
<script type="text/javascript" src="clipboard.js"></script>
|
|
<script type="text/javascript" src="cookie.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="search/search.css" />
|
|
<link rel="stylesheet" type="text/css" href="searchOverrides.css" />
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function() { init_search(); });
|
|
/* @license-end */
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="banner-container">
|
|
<div id="banner">
|
|
<span id="sfml">SFML 3.0.0</span>
|
|
</div>
|
|
</div>
|
|
<div id="content">
|
|
<div>
|
|
<!-- Generated by Doxygen 1.12.0 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search/",'.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() { codefold.init(0); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="topics.html"><span>Topics</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li><a href="files.html"><span>Files</span></a></li>
|
|
<li>
|
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
|
<span class="left">
|
|
<span id="MSearchSelect" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()"> </span>
|
|
<input type="text" id="MSearchField" value="" placeholder="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
</span><span class="right">
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.svg" alt=""/></a>
|
|
</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="annotated.html"><span>Class List</span></a></li>
|
|
<li><a href="classes.html"><span>Class Index</span></a></li>
|
|
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
|
|
<li><a href="functions.html"><span>Class Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function(){ initResizable(false); });
|
|
/* @license-end */
|
|
</script>
|
|
<!-- 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">
|
|
<div id="MSearchResults">
|
|
<div class="SRPage">
|
|
<div id="SRIndex">
|
|
<div id="SRResults"></div>
|
|
<div class="SRStatus" id="Loading">Loading...</div>
|
|
<div class="SRStatus" id="Searching">Searching...</div>
|
|
<div class="SRStatus" id="NoMatches">No Matches</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="nav-path" class="navpath">
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="namespacesf.html">sf</a></li><li class="navelem"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a></li> </ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div id="doc-content">
|
|
<div class="header">
|
|
<div class="summary">
|
|
<a href="#nested-classes">Classes</a> |
|
|
<a href="#pub-types">Public Types</a> |
|
|
<a href="#pub-methods">Public Member Functions</a> |
|
|
<a href="#pro-methods">Protected Member Functions</a> |
|
|
<a href="classsf_1_1SoundSource-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">sf::SoundSource 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>Base class defining a sound's properties.
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="SoundSource_8hpp_source.html">SFML/Audio/SoundSource.hpp</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for sf::SoundSource:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="classsf_1_1SoundSource.png" usemap="#sf::SoundSource_map" alt=""/>
|
|
<map id="sf::SoundSource_map" name="sf::SoundSource_map">
|
|
<area href="classsf_1_1AudioResource.html" title="Base class for classes that require an audio device." alt="sf::AudioResource" shape="rect" coords="62,0,177,24"/>
|
|
<area href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment." alt="sf::Sound" shape="rect" coords="0,112,115,136"/>
|
|
<area href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources." alt="sf::SoundStream" shape="rect" coords="125,112,240,136"/>
|
|
<area href="classsf_1_1Music.html" title="Streamed music played from an audio file." alt="sf::Music" shape="rect" coords="125,168,240,192"/>
|
|
</map>
|
|
</div></div>
|
|
<table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
|
|
Classes</h2></td></tr>
|
|
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structsf_1_1SoundSource_1_1Cone.html">Cone</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Structure defining the properties of a directional cone. <a href="structsf_1_1SoundSource_1_1Cone.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
|
|
Public Types</h2></td></tr>
|
|
<tr class="memitem:ac43af72c98c077500b239bc75b812f03" id="r_ac43af72c98c077500b239bc75b812f03"><td class="memItemLeft" align="right" valign="top">enum class  </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac43af72c98c077500b239bc75b812f03">Status</a> { <a class="el" href="#ac43af72c98c077500b239bc75b812f03ac23e2b09ebe6bf4cb5e2a9abe85c0be2">Stopped</a>
|
|
, <a class="el" href="#ac43af72c98c077500b239bc75b812f03ae99180abf47a8b3a856e0bcb2656990a">Paused</a>
|
|
, <a class="el" href="#ac43af72c98c077500b239bc75b812f03ac9dbb2b7c84159b632d71e512eba8428">Playing</a>
|
|
}</td></tr>
|
|
<tr class="memdesc:ac43af72c98c077500b239bc75b812f03"><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of the sound source states. <a href="#ac43af72c98c077500b239bc75b812f03">More...</a><br /></td></tr>
|
|
<tr class="separator:ac43af72c98c077500b239bc75b812f03"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab13ce12bd2ef4856511824557b07cce5" id="r_ab13ce12bd2ef4856511824557b07cce5"><td class="memItemLeft" align="right" valign="top">using </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab13ce12bd2ef4856511824557b07cce5">EffectProcessor</a></td></tr>
|
|
<tr class="memdesc:ab13ce12bd2ef4856511824557b07cce5"><td class="mdescLeft"> </td><td class="mdescRight">Callable that is provided with sound data for processing. <br /></td></tr>
|
|
<tr class="separator:ab13ce12bd2ef4856511824557b07cce5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
|
|
Public Member Functions</h2></td></tr>
|
|
<tr class="memitem:a6ce8c6dd7a8700d4f3be3f2dcc605e56" id="r_a6ce8c6dd7a8700d4f3be3f2dcc605e56"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6ce8c6dd7a8700d4f3be3f2dcc605e56">SoundSource</a> (const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &)=default</td></tr>
|
|
<tr class="memdesc:a6ce8c6dd7a8700d4f3be3f2dcc605e56"><td class="mdescLeft"> </td><td class="mdescRight">Copy constructor. <br /></td></tr>
|
|
<tr class="separator:a6ce8c6dd7a8700d4f3be3f2dcc605e56"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a51ddcc26cad71ea06a8ca9bda6559f76" id="r_a51ddcc26cad71ea06a8ca9bda6559f76"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a51ddcc26cad71ea06a8ca9bda6559f76">SoundSource</a> (<a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &&) noexcept=default</td></tr>
|
|
<tr class="memdesc:a51ddcc26cad71ea06a8ca9bda6559f76"><td class="mdescLeft"> </td><td class="mdescRight">Move constructor. <br /></td></tr>
|
|
<tr class="separator:a51ddcc26cad71ea06a8ca9bda6559f76"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aef012cb2878441921a68bb476e38fda0" id="r_aef012cb2878441921a68bb476e38fda0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#aef012cb2878441921a68bb476e38fda0">operator=</a> (<a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &&) noexcept=default</td></tr>
|
|
<tr class="memdesc:aef012cb2878441921a68bb476e38fda0"><td class="mdescLeft"> </td><td class="mdescRight">Move assignment. <br /></td></tr>
|
|
<tr class="separator:aef012cb2878441921a68bb476e38fda0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:afa948f51e57183c24922dc477371cbbf" id="r_afa948f51e57183c24922dc477371cbbf"><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="#afa948f51e57183c24922dc477371cbbf">~SoundSource</a> ()=default</td></tr>
|
|
<tr class="memdesc:afa948f51e57183c24922dc477371cbbf"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
|
|
<tr class="separator:afa948f51e57183c24922dc477371cbbf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a72a13695ed48b7f7b55e7cd4431f4bb6" id="r_a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a72a13695ed48b7f7b55e7cd4431f4bb6">setPitch</a> (float pitch)</td></tr>
|
|
<tr class="memdesc:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="mdescLeft"> </td><td class="mdescRight">Set the pitch of the sound. <br /></td></tr>
|
|
<tr class="separator:a72a13695ed48b7f7b55e7cd4431f4bb6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ad08a99b6f3492b940a2ef20c8d3cbc72" id="r_ad08a99b6f3492b940a2ef20c8d3cbc72"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad08a99b6f3492b940a2ef20c8d3cbc72">setPan</a> (float pan)</td></tr>
|
|
<tr class="memdesc:ad08a99b6f3492b940a2ef20c8d3cbc72"><td class="mdescLeft"> </td><td class="mdescRight">Set the pan of the sound. <br /></td></tr>
|
|
<tr class="separator:ad08a99b6f3492b940a2ef20c8d3cbc72"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2f192f2b49fb8e2b82f3498d3663fcc2" id="r_a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2f192f2b49fb8e2b82f3498d3663fcc2">setVolume</a> (float volume)</td></tr>
|
|
<tr class="memdesc:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="mdescLeft"> </td><td class="mdescRight">Set the volume of the sound. <br /></td></tr>
|
|
<tr class="separator:a2f192f2b49fb8e2b82f3498d3663fcc2"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6586a19a8d1060bdf93e3c4b6ee039a7" id="r_a6586a19a8d1060bdf93e3c4b6ee039a7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6586a19a8d1060bdf93e3c4b6ee039a7">setSpatializationEnabled</a> (bool enabled)</td></tr>
|
|
<tr class="memdesc:a6586a19a8d1060bdf93e3c4b6ee039a7"><td class="mdescLeft"> </td><td class="mdescRight">Set whether spatialization of the sound is enabled. <br /></td></tr>
|
|
<tr class="separator:a6586a19a8d1060bdf93e3c4b6ee039a7"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a17ba9ed01925395652181a7b2a7d3aef" id="r_a17ba9ed01925395652181a7b2a7d3aef"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a17ba9ed01925395652181a7b2a7d3aef">setPosition</a> (const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &position)</td></tr>
|
|
<tr class="memdesc:a17ba9ed01925395652181a7b2a7d3aef"><td class="mdescLeft"> </td><td class="mdescRight">Set the 3D position of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:a17ba9ed01925395652181a7b2a7d3aef"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac46223c70c01f43bb6a443001cdd0599" id="r_ac46223c70c01f43bb6a443001cdd0599"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac46223c70c01f43bb6a443001cdd0599">setDirection</a> (const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &direction)</td></tr>
|
|
<tr class="memdesc:ac46223c70c01f43bb6a443001cdd0599"><td class="mdescLeft"> </td><td class="mdescRight">Set the 3D direction of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:ac46223c70c01f43bb6a443001cdd0599"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aba2cbcc0be18840880b54a112a0e69a1" id="r_aba2cbcc0be18840880b54a112a0e69a1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aba2cbcc0be18840880b54a112a0e69a1">setCone</a> (const <a class="el" href="structsf_1_1SoundSource_1_1Cone.html">Cone</a> &cone)</td></tr>
|
|
<tr class="memdesc:aba2cbcc0be18840880b54a112a0e69a1"><td class="mdescLeft"> </td><td class="mdescRight">Set the cone properties of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:aba2cbcc0be18840880b54a112a0e69a1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a3ed894bdb323e26518c9e1548fc3488c" id="r_a3ed894bdb323e26518c9e1548fc3488c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a3ed894bdb323e26518c9e1548fc3488c">setVelocity</a> (const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &velocity)</td></tr>
|
|
<tr class="memdesc:a3ed894bdb323e26518c9e1548fc3488c"><td class="mdescLeft"> </td><td class="mdescRight">Set the 3D velocity of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:a3ed894bdb323e26518c9e1548fc3488c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2d229ff4e5f5d61bb12c1a6b94841f96" id="r_a2d229ff4e5f5d61bb12c1a6b94841f96"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d229ff4e5f5d61bb12c1a6b94841f96">setDopplerFactor</a> (float factor)</td></tr>
|
|
<tr class="memdesc:a2d229ff4e5f5d61bb12c1a6b94841f96"><td class="mdescLeft"> </td><td class="mdescRight">Set the doppler factor of the sound. <br /></td></tr>
|
|
<tr class="separator:a2d229ff4e5f5d61bb12c1a6b94841f96"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aeae4c21b585e54814b6a8ca8542ddf49" id="r_aeae4c21b585e54814b6a8ca8542ddf49"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aeae4c21b585e54814b6a8ca8542ddf49">setDirectionalAttenuationFactor</a> (float factor)</td></tr>
|
|
<tr class="memdesc:aeae4c21b585e54814b6a8ca8542ddf49"><td class="mdescLeft"> </td><td class="mdescRight">Set the directional attenuation factor of the sound. <br /></td></tr>
|
|
<tr class="separator:aeae4c21b585e54814b6a8ca8542ddf49"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac478a8b813faf7dd575635b102081d0d" id="r_ac478a8b813faf7dd575635b102081d0d"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac478a8b813faf7dd575635b102081d0d">setRelativeToListener</a> (bool relative)</td></tr>
|
|
<tr class="memdesc:ac478a8b813faf7dd575635b102081d0d"><td class="mdescLeft"> </td><td class="mdescRight">Make the sound's position relative to the listener or absolute. <br /></td></tr>
|
|
<tr class="separator:ac478a8b813faf7dd575635b102081d0d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a75bbc2c34addc8b25a14edb908508afe" id="r_a75bbc2c34addc8b25a14edb908508afe"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a75bbc2c34addc8b25a14edb908508afe">setMinDistance</a> (float distance)</td></tr>
|
|
<tr class="memdesc:a75bbc2c34addc8b25a14edb908508afe"><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum distance of the sound. <br /></td></tr>
|
|
<tr class="separator:a75bbc2c34addc8b25a14edb908508afe"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a484275e6ecfa041ea9e690a8635c2212" id="r_a484275e6ecfa041ea9e690a8635c2212"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a484275e6ecfa041ea9e690a8635c2212">setMaxDistance</a> (float distance)</td></tr>
|
|
<tr class="memdesc:a484275e6ecfa041ea9e690a8635c2212"><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum distance of the sound. <br /></td></tr>
|
|
<tr class="separator:a484275e6ecfa041ea9e690a8635c2212"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae6789b20e1a7525d6a7611466e955f50" id="r_ae6789b20e1a7525d6a7611466e955f50"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae6789b20e1a7525d6a7611466e955f50">setMinGain</a> (float gain)</td></tr>
|
|
<tr class="memdesc:ae6789b20e1a7525d6a7611466e955f50"><td class="mdescLeft"> </td><td class="mdescRight">Set the minimum gain of the sound. <br /></td></tr>
|
|
<tr class="separator:ae6789b20e1a7525d6a7611466e955f50"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aaf799cceb2a8b3d5a93320c35a955fb1" id="r_aaf799cceb2a8b3d5a93320c35a955fb1"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aaf799cceb2a8b3d5a93320c35a955fb1">setMaxGain</a> (float gain)</td></tr>
|
|
<tr class="memdesc:aaf799cceb2a8b3d5a93320c35a955fb1"><td class="mdescLeft"> </td><td class="mdescRight">Set the maximum gain of the sound. <br /></td></tr>
|
|
<tr class="separator:aaf799cceb2a8b3d5a93320c35a955fb1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa2adff44cd2f8b4e3c7315d7c2a45626" id="r_aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626">setAttenuation</a> (float attenuation)</td></tr>
|
|
<tr class="memdesc:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="mdescLeft"> </td><td class="mdescRight">Set the attenuation factor of the sound. <br /></td></tr>
|
|
<tr class="separator:aa2adff44cd2f8b4e3c7315d7c2a45626"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a93f431c479da8b7774af4f393099ada4" id="r_a93f431c479da8b7774af4f393099ada4"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a93f431c479da8b7774af4f393099ada4">setEffectProcessor</a> (<a class="el" href="#ab13ce12bd2ef4856511824557b07cce5">EffectProcessor</a> effectProcessor)</td></tr>
|
|
<tr class="memdesc:a93f431c479da8b7774af4f393099ada4"><td class="mdescLeft"> </td><td class="mdescRight">Set the effect processor to be applied to the sound. <br /></td></tr>
|
|
<tr class="separator:a93f431c479da8b7774af4f393099ada4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4736acc2c802f927544c9ce52a44a9e4" id="r_a4736acc2c802f927544c9ce52a44a9e4"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4736acc2c802f927544c9ce52a44a9e4">getPitch</a> () const</td></tr>
|
|
<tr class="memdesc:a4736acc2c802f927544c9ce52a44a9e4"><td class="mdescLeft"> </td><td class="mdescRight">Get the pitch of the sound. <br /></td></tr>
|
|
<tr class="separator:a4736acc2c802f927544c9ce52a44a9e4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0fbe0259aa4fc8440d34d156bb8dd901" id="r_a0fbe0259aa4fc8440d34d156bb8dd901"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0fbe0259aa4fc8440d34d156bb8dd901">getPan</a> () const</td></tr>
|
|
<tr class="memdesc:a0fbe0259aa4fc8440d34d156bb8dd901"><td class="mdescLeft"> </td><td class="mdescRight">Get the pan of the sound. <br /></td></tr>
|
|
<tr class="separator:a0fbe0259aa4fc8440d34d156bb8dd901"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a04243fb5edf64561689b1d58953fc4ce" id="r_a04243fb5edf64561689b1d58953fc4ce"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a04243fb5edf64561689b1d58953fc4ce">getVolume</a> () const</td></tr>
|
|
<tr class="memdesc:a04243fb5edf64561689b1d58953fc4ce"><td class="mdescLeft"> </td><td class="mdescRight">Get the volume of the sound. <br /></td></tr>
|
|
<tr class="separator:a04243fb5edf64561689b1d58953fc4ce"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a805a8bba4ce7ac1f04fdb073974fee9b" id="r_a805a8bba4ce7ac1f04fdb073974fee9b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a805a8bba4ce7ac1f04fdb073974fee9b">isSpatializationEnabled</a> () const</td></tr>
|
|
<tr class="memdesc:a805a8bba4ce7ac1f04fdb073974fee9b"><td class="mdescLeft"> </td><td class="mdescRight">Tell whether spatialization of the sound is enabled. <br /></td></tr>
|
|
<tr class="separator:a805a8bba4ce7ac1f04fdb073974fee9b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8d199521f55550c7a3b2b0f6950dffa1" id="r_a8d199521f55550c7a3b2b0f6950dffa1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a8d199521f55550c7a3b2b0f6950dffa1">getPosition</a> () const</td></tr>
|
|
<tr class="memdesc:a8d199521f55550c7a3b2b0f6950dffa1"><td class="mdescLeft"> </td><td class="mdescRight">Get the 3D position of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:a8d199521f55550c7a3b2b0f6950dffa1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2d9b249242e403d0f2638977357995fd" id="r_a2d9b249242e403d0f2638977357995fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d9b249242e403d0f2638977357995fd">getDirection</a> () const</td></tr>
|
|
<tr class="memdesc:a2d9b249242e403d0f2638977357995fd"><td class="mdescLeft"> </td><td class="mdescRight">Get the 3D direction of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:a2d9b249242e403d0f2638977357995fd"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adee94455dfe9d1a87ec45d1afe09e092" id="r_adee94455dfe9d1a87ec45d1afe09e092"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsf_1_1SoundSource_1_1Cone.html">Cone</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#adee94455dfe9d1a87ec45d1afe09e092">getCone</a> () const</td></tr>
|
|
<tr class="memdesc:adee94455dfe9d1a87ec45d1afe09e092"><td class="mdescLeft"> </td><td class="mdescRight">Get the cone properties of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:adee94455dfe9d1a87ec45d1afe09e092"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a9ae37256230fe3bce3ddab5edf8936a1" id="r_a9ae37256230fe3bce3ddab5edf8936a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a9ae37256230fe3bce3ddab5edf8936a1">getVelocity</a> () const</td></tr>
|
|
<tr class="memdesc:a9ae37256230fe3bce3ddab5edf8936a1"><td class="mdescLeft"> </td><td class="mdescRight">Get the 3D velocity of the sound in the audio scene. <br /></td></tr>
|
|
<tr class="separator:a9ae37256230fe3bce3ddab5edf8936a1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af6eb03a66214b68bc2f4edb42952e6f5" id="r_af6eb03a66214b68bc2f4edb42952e6f5"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#af6eb03a66214b68bc2f4edb42952e6f5">getDopplerFactor</a> () const</td></tr>
|
|
<tr class="memdesc:af6eb03a66214b68bc2f4edb42952e6f5"><td class="mdescLeft"> </td><td class="mdescRight">Get the doppler factor of the sound. <br /></td></tr>
|
|
<tr class="separator:af6eb03a66214b68bc2f4edb42952e6f5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:aa1ac48f196605eb96521344bc8eb93b5" id="r_aa1ac48f196605eb96521344bc8eb93b5"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#aa1ac48f196605eb96521344bc8eb93b5">getDirectionalAttenuationFactor</a> () const</td></tr>
|
|
<tr class="memdesc:aa1ac48f196605eb96521344bc8eb93b5"><td class="mdescLeft"> </td><td class="mdescRight">Get the directional attenuation factor of the sound. <br /></td></tr>
|
|
<tr class="separator:aa1ac48f196605eb96521344bc8eb93b5"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:adcdb4ef32c2f4481d34aff0b5c31534b" id="r_adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#adcdb4ef32c2f4481d34aff0b5c31534b">isRelativeToListener</a> () const</td></tr>
|
|
<tr class="memdesc:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="mdescLeft"> </td><td class="mdescRight">Tell whether the sound's position is relative to the listener or is absolute. <br /></td></tr>
|
|
<tr class="separator:adcdb4ef32c2f4481d34aff0b5c31534b"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a605ca7f359ec1c36fcccdcd4696562ac" id="r_a605ca7f359ec1c36fcccdcd4696562ac"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a605ca7f359ec1c36fcccdcd4696562ac">getMinDistance</a> () const</td></tr>
|
|
<tr class="memdesc:a605ca7f359ec1c36fcccdcd4696562ac"><td class="mdescLeft"> </td><td class="mdescRight">Get the minimum distance of the sound. <br /></td></tr>
|
|
<tr class="separator:a605ca7f359ec1c36fcccdcd4696562ac"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a471e2644f3599ac583bca92072ed3eec" id="r_a471e2644f3599ac583bca92072ed3eec"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a471e2644f3599ac583bca92072ed3eec">getMaxDistance</a> () const</td></tr>
|
|
<tr class="memdesc:a471e2644f3599ac583bca92072ed3eec"><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum distance of the sound. <br /></td></tr>
|
|
<tr class="separator:a471e2644f3599ac583bca92072ed3eec"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a08a8b71fc60a4549db55add457209829" id="r_a08a8b71fc60a4549db55add457209829"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a08a8b71fc60a4549db55add457209829">getMinGain</a> () const</td></tr>
|
|
<tr class="memdesc:a08a8b71fc60a4549db55add457209829"><td class="mdescLeft"> </td><td class="mdescRight">Get the minimum gain of the sound. <br /></td></tr>
|
|
<tr class="separator:a08a8b71fc60a4549db55add457209829"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a706eddad92fa4cf16b108b8942b72f26" id="r_a706eddad92fa4cf16b108b8942b72f26"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a706eddad92fa4cf16b108b8942b72f26">getMaxGain</a> () const</td></tr>
|
|
<tr class="memdesc:a706eddad92fa4cf16b108b8942b72f26"><td class="mdescLeft"> </td><td class="mdescRight">Get the maximum gain of the sound. <br /></td></tr>
|
|
<tr class="separator:a706eddad92fa4cf16b108b8942b72f26"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a8ad7dafb4f1b4afbc638cebe24f48cc9" id="r_a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9">getAttenuation</a> () const</td></tr>
|
|
<tr class="memdesc:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="mdescLeft"> </td><td class="mdescRight">Get the attenuation factor of the sound. <br /></td></tr>
|
|
<tr class="separator:a8ad7dafb4f1b4afbc638cebe24f48cc9"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4b494e4a0b819bae9cd99b43e2f3f59d" id="r_a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4b494e4a0b819bae9cd99b43e2f3f59d">operator=</a> (const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &right)</td></tr>
|
|
<tr class="memdesc:a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="mdescLeft"> </td><td class="mdescRight">Overload of assignment operator. <br /></td></tr>
|
|
<tr class="separator:a4b494e4a0b819bae9cd99b43e2f3f59d"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a6e1bbb1f247ed8743faf3b1ed6f2bc21" id="r_a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a6e1bbb1f247ed8743faf3b1ed6f2bc21">play</a> ()=0</td></tr>
|
|
<tr class="memdesc:a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="mdescLeft"> </td><td class="mdescRight">Start or resume playing the sound source. <br /></td></tr>
|
|
<tr class="separator:a6e1bbb1f247ed8743faf3b1ed6f2bc21"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a21553d4e8fcf136231dd8c7ad4630aba" id="r_a21553d4e8fcf136231dd8c7ad4630aba"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a21553d4e8fcf136231dd8c7ad4630aba">pause</a> ()=0</td></tr>
|
|
<tr class="memdesc:a21553d4e8fcf136231dd8c7ad4630aba"><td class="mdescLeft"> </td><td class="mdescRight">Pause the sound source. <br /></td></tr>
|
|
<tr class="separator:a21553d4e8fcf136231dd8c7ad4630aba"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a06501a25b12376befcc7ee1ed4865fda" id="r_a06501a25b12376befcc7ee1ed4865fda"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a06501a25b12376befcc7ee1ed4865fda">stop</a> ()=0</td></tr>
|
|
<tr class="memdesc:a06501a25b12376befcc7ee1ed4865fda"><td class="mdescLeft"> </td><td class="mdescRight">Stop playing the sound source. <br /></td></tr>
|
|
<tr class="separator:a06501a25b12376befcc7ee1ed4865fda"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ab4d68d465eb18709d38e164a5c0ee2c4" id="r_ab4d68d465eb18709d38e164a5c0ee2c4"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="#ac43af72c98c077500b239bc75b812f03">Status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ab4d68d465eb18709d38e164a5c0ee2c4">getStatus</a> () const =0</td></tr>
|
|
<tr class="memdesc:ab4d68d465eb18709d38e164a5c0ee2c4"><td class="mdescLeft"> </td><td class="mdescRight">Get the current status of the sound (stopped, paused, playing) <br /></td></tr>
|
|
<tr class="separator:ab4d68d465eb18709d38e164a5c0ee2c4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table><table class="memberdecls">
|
|
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pro-methods" name="pro-methods"></a>
|
|
Protected Member Functions</h2></td></tr>
|
|
<tr class="memitem:aae9b0f8e38214e66d1b54759d6e4ebad" id="r_aae9b0f8e38214e66d1b54759d6e4ebad"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#aae9b0f8e38214e66d1b54759d6e4ebad">SoundSource</a> ()=default</td></tr>
|
|
<tr class="memdesc:aae9b0f8e38214e66d1b54759d6e4ebad"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br /></td></tr>
|
|
<tr class="separator:aae9b0f8e38214e66d1b54759d6e4ebad"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Base class defining a sound's properties. </p>
|
|
<p><code><a class="el" href="classsf_1_1SoundSource.html" title="Base class defining a sound's properties.">sf::SoundSource</a></code> is not meant to be used directly, it only serves as a common base for all audio objects that can live in the audio environment.</p>
|
|
<p>It defines several properties for the sound: pitch, volume, position, attenuation, etc. All of them can be changed at any time with no impact on performances.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">sf::Sound</a></code>, <code><a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources.">sf::SoundStream</a></code> </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00047">47</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
|
|
</div><h2 class="groupheader">Member Typedef Documentation</h2>
|
|
<a id="ab13ce12bd2ef4856511824557b07cce5" name="ab13ce12bd2ef4856511824557b07cce5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab13ce12bd2ef4856511824557b07cce5">◆ </a></span>EffectProcessor</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">using <a class="el" href="#ab13ce12bd2ef4856511824557b07cce5">sf::SoundSource::EffectProcessor</a></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<b>Initial value:</b><div class="fragment"><div class="line"> std::function<</div>
|
|
<div class="line"> void(<span class="keyword">const</span> <span class="keywordtype">float</span>* inputFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>& inputFrameCount, <span class="keywordtype">float</span>* outputFrames, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>& outputFrameCount, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> frameChannelCount)></div>
|
|
</div><!-- fragment -->
|
|
<p>Callable that is provided with sound data for processing. </p>
|
|
<p>When the audio engine sources sound data from sound sources it will pass the data through an effects processor if one is set. The sound data will already be converted to the internal floating point format.</p>
|
|
<p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> data that is processed this way is provided in frames. Each frame contains 1 floating point sample per channel. If e.g. the data source provides stereo data, each frame will contain 2 floats.</p>
|
|
<p>The effects processor function takes 4 parameters:</p><ul>
|
|
<li>The input data frames, channels interleaved</li>
|
|
<li>The number of input data frames available</li>
|
|
<li>The buffer to write output data frames to, channels interleaved</li>
|
|
<li>The number of output data frames that the output buffer can hold</li>
|
|
<li>The channel count</li>
|
|
</ul>
|
|
<p>The input and output frame counts are in/out parameters.</p>
|
|
<p>When this function is called, the input count will contain the number of frames available in the input buffer. The output count will contain the size of the output buffer i.e. the maximum number of frames that can be written to the output buffer.</p>
|
|
<p>Attempting to read more frames than the input frame count or write more frames than the output frame count will result in undefined behaviour.</p>
|
|
<p>It is important to note that the channel count of the audio engine currently sourcing data from this sound will always be provided in <code>frameChannelCount</code>. This can be different from the channel count of the sound source so make sure to size necessary processing buffers according to the engine channel count and not the sound source channel count.</p>
|
|
<p>When done processing the frames, the input and output frame counts must be updated to reflect the actual number of frames that were read from the input and written to the output.</p>
|
|
<p>The processing function should always try to process as much sound data as possible i.e. always try to fill the output buffer to the maximum. In certain situations for specific effects it can be possible that the input frame count and output frame count aren't equal. As long as the frame counts are updated accordingly this is perfectly valid.</p>
|
|
<p>If the audio engine determines that no audio data is available from the data source, the input data frames pointer is set to <code>nullptr</code> and the input frame count is set to 0. In this case it is up to the function to decide how to handle the situation. For specific effects e.g. Echo/Delay buffered data might still be able to be written to the output buffer even if there is no longer any input data.</p>
|
|
<p>An important thing to remember is that this function is directly called by the audio engine. Because the audio engine runs on an internal thread of its own, make sure access to shared data is synchronized appropriately.</p>
|
|
<p>Because this function is stored by the <code><a class="el" href="classsf_1_1SoundSource.html" title="Base class defining a sound's properties.">SoundSource</a></code> object it will be able to be called as long as the <code><a class="el" href="classsf_1_1SoundSource.html" title="Base class defining a sound's properties.">SoundSource</a></code> object hasn't yet been destroyed. Make sure that any data this function references outlives the <a class="el" href="classsf_1_1SoundSource.html" title="Base class defining a sound's properties.">SoundSource</a> object otherwise use-after-free errors will occur. </p>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="SoundSource_8hpp_source.html#l00154">154</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Enumeration Documentation</h2>
|
|
<a id="ac43af72c98c077500b239bc75b812f03" name="ac43af72c98c077500b239bc75b812f03"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac43af72c98c077500b239bc75b812f03">◆ </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 class <a class="el" href="#ac43af72c98c077500b239bc75b812f03">sf::SoundSource::Status</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">strong</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="ac43af72c98c077500b239bc75b812f03ac23e2b09ebe6bf4cb5e2a9abe85c0be2" name="ac43af72c98c077500b239bc75b812f03ac23e2b09ebe6bf4cb5e2a9abe85c0be2"></a>Stopped </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="ac43af72c98c077500b239bc75b812f03ae99180abf47a8b3a856e0bcb2656990a" name="ac43af72c98c077500b239bc75b812f03ae99180abf47a8b3a856e0bcb2656990a"></a>Paused </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="ac43af72c98c077500b239bc75b812f03ac9dbb2b7c84159b632d71e512eba8428" name="ac43af72c98c077500b239bc75b812f03ac9dbb2b7c84159b632d71e512eba8428"></a>Playing </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#l00054">54</a> of file <a class="el" href="SoundSource_8hpp_source.html">SoundSource.hpp</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Constructor & Destructor Documentation</h2>
|
|
<a id="a6ce8c6dd7a8700d4f3be3f2dcc605e56" name="a6ce8c6dd7a8700d4f3be3f2dcc605e56"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6ce8c6dd7a8700d4f3be3f2dcc605e56">◆ </a></span>SoundSource() <span class="overload">[1/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::SoundSource::SoundSource </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">default</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Copy constructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a51ddcc26cad71ea06a8ca9bda6559f76" name="a51ddcc26cad71ea06a8ca9bda6559f76"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a51ddcc26cad71ea06a8ca9bda6559f76">◆ </a></span>SoundSource() <span class="overload">[2/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::SoundSource::SoundSource </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &&</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">default</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move constructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="afa948f51e57183c24922dc477371cbbf" name="afa948f51e57183c24922dc477371cbbf"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#afa948f51e57183c24922dc477371cbbf">◆ </a></span>~SoundSource()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual sf::SoundSource::~SoundSource </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">virtual</span><span class="mlabel">default</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Destructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aae9b0f8e38214e66d1b54759d6e4ebad" name="aae9b0f8e38214e66d1b54759d6e4ebad"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aae9b0f8e38214e66d1b54759d6e4ebad">◆ </a></span>SoundSource() <span class="overload">[3/3]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::SoundSource::SoundSource </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span><span class="mlabel">default</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<p>This constructor is meant to be called by derived classes only. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a8ad7dafb4f1b4afbc638cebe24f48cc9" name="a8ad7dafb4f1b4afbc638cebe24f48cc9"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8ad7dafb4f1b4afbc638cebe24f48cc9">◆ </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"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code>, <code><a class="el" href="#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adee94455dfe9d1a87ec45d1afe09e092" name="adee94455dfe9d1a87ec45d1afe09e092"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adee94455dfe9d1a87ec45d1afe09e092">◆ </a></span>getCone()</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="structsf_1_1SoundSource_1_1Cone.html">Cone</a> sf::SoundSource::getCone </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the cone properties of the sound in the audio scene. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="structsf_1_1SoundSource_1_1Cone.html" title="Structure defining the properties of a directional cone.">Cone</a> properties of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aba2cbcc0be18840880b54a112a0e69a1" title="Set the cone properties of the sound in the audio scene.">setCone</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2d9b249242e403d0f2638977357995fd" name="a2d9b249242e403d0f2638977357995fd"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2d9b249242e403d0f2638977357995fd">◆ </a></span>getDirection()</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="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> sf::SoundSource::getDirection </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the 3D direction of the sound in the audio scene. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Direction of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ac46223c70c01f43bb6a443001cdd0599" title="Set the 3D direction of the sound in the audio scene.">setDirection</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa1ac48f196605eb96521344bc8eb93b5" name="aa1ac48f196605eb96521344bc8eb93b5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa1ac48f196605eb96521344bc8eb93b5">◆ </a></span>getDirectionalAttenuationFactor()</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::getDirectionalAttenuationFactor </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the directional attenuation factor of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Directional attenuation factor of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aeae4c21b585e54814b6a8ca8542ddf49" title="Set the directional attenuation factor of the sound.">setDirectionalAttenuationFactor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af6eb03a66214b68bc2f4edb42952e6f5" name="af6eb03a66214b68bc2f4edb42952e6f5"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af6eb03a66214b68bc2f4edb42952e6f5">◆ </a></span>getDopplerFactor()</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::getDopplerFactor </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the doppler factor of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Doppler factor of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a2d229ff4e5f5d61bb12c1a6b94841f96" title="Set the doppler factor of the sound.">setDopplerFactor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a471e2644f3599ac583bca92072ed3eec" name="a471e2644f3599ac583bca92072ed3eec"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a471e2644f3599ac583bca92072ed3eec">◆ </a></span>getMaxDistance()</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::getMaxDistance </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the maximum distance of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Maximum distance of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a484275e6ecfa041ea9e690a8635c2212" title="Set the maximum distance of the sound.">setMaxDistance</a></code>, <code><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a706eddad92fa4cf16b108b8942b72f26" name="a706eddad92fa4cf16b108b8942b72f26"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a706eddad92fa4cf16b108b8942b72f26">◆ </a></span>getMaxGain()</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::getMaxGain </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the maximum gain of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Maximum gain of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aaf799cceb2a8b3d5a93320c35a955fb1" title="Set the maximum gain of the sound.">setMaxGain</a></code>, <code><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a605ca7f359ec1c36fcccdcd4696562ac" name="a605ca7f359ec1c36fcccdcd4696562ac"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a605ca7f359ec1c36fcccdcd4696562ac">◆ </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"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code><a class="el" href="#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound.">setMinDistance</a></code>, <code><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a08a8b71fc60a4549db55add457209829" name="a08a8b71fc60a4549db55add457209829"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a08a8b71fc60a4549db55add457209829">◆ </a></span>getMinGain()</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::getMinGain </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the minimum gain of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Minimum gain of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ae6789b20e1a7525d6a7611466e955f50" title="Set the minimum gain of the sound.">setMinGain</a></code>, <code><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0fbe0259aa4fc8440d34d156bb8dd901" name="a0fbe0259aa4fc8440d34d156bb8dd901"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0fbe0259aa4fc8440d34d156bb8dd901">◆ </a></span>getPan()</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::getPan </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the pan of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pan of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ad08a99b6f3492b940a2ef20c8d3cbc72" title="Set the pan of the sound.">setPan</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4736acc2c802f927544c9ce52a44a9e4" name="a4736acc2c802f927544c9ce52a44a9e4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4736acc2c802f927544c9ce52a44a9e4">◆ </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"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code><a class="el" href="#a72a13695ed48b7f7b55e7cd4431f4bb6" title="Set the pitch of the sound.">setPitch</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a8d199521f55550c7a3b2b0f6950dffa1" name="a8d199521f55550c7a3b2b0f6950dffa1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a8d199521f55550c7a3b2b0f6950dffa1">◆ </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="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> sf::SoundSource::getPosition </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code><a class="el" href="#a17ba9ed01925395652181a7b2a7d3aef" title="Set the 3D position of the sound in the audio scene.">setPosition</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ab4d68d465eb18709d38e164a5c0ee2c4" name="ab4d68d465eb18709d38e164a5c0ee2c4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ab4d68d465eb18709d38e164a5c0ee2c4">◆ </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">virtual <a class="el" href="#ac43af72c98c077500b239bc75b812f03">Status</a> sf::SoundSource::getStatus </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the current status of the sound (stopped, paused, playing) </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Current status of the sound </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a1291b375d4fe31a313ab969dac814517">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a607e74492ca84764be563f36d75a1384">sf::SoundStream</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a9ae37256230fe3bce3ddab5edf8936a1" name="a9ae37256230fe3bce3ddab5edf8936a1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a9ae37256230fe3bce3ddab5edf8936a1">◆ </a></span>getVelocity()</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="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> sf::SoundSource::getVelocity </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the 3D velocity of the sound in the audio scene. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Velocity of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a3ed894bdb323e26518c9e1548fc3488c" title="Set the 3D velocity of the sound in the audio scene.">setVelocity</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a04243fb5edf64561689b1d58953fc4ce" name="a04243fb5edf64561689b1d58953fc4ce"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a04243fb5edf64561689b1d58953fc4ce">◆ </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"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code><a class="el" href="#a2f192f2b49fb8e2b82f3498d3663fcc2" title="Set the volume of the sound.">setVolume</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="adcdb4ef32c2f4481d34aff0b5c31534b" name="adcdb4ef32c2f4481d34aff0b5c31534b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#adcdb4ef32c2f4481d34aff0b5c31534b">◆ </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"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</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><code>true</code> if the position is relative, <code>false</code> if it's absolute</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ac478a8b813faf7dd575635b102081d0d" title="Make the sound's position relative to the listener or absolute.">setRelativeToListener</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a805a8bba4ce7ac1f04fdb073974fee9b" name="a805a8bba4ce7ac1f04fdb073974fee9b"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a805a8bba4ce7ac1f04fdb073974fee9b">◆ </a></span>isSpatializationEnabled()</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::isSpatializationEnabled </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td> const</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Tell whether spatialization of the sound is enabled. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if spatialization is enabled, <code>false</code> if it's disabled</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a6586a19a8d1060bdf93e3c4b6ee039a7" title="Set whether spatialization of the sound is enabled.">setSpatializationEnabled</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4b494e4a0b819bae9cd99b43e2f3f59d" name="a4b494e4a0b819bae9cd99b43e2f3f59d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4b494e4a0b819bae9cd99b43e2f3f59d">◆ </a></span>operator=() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> & sf::SoundSource::operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &</td> <td class="paramname"><span class="paramname"><em>right</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Overload of assignment operator. </p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">right</td><td>Instance to assign</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd>Reference to self </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aef012cb2878441921a68bb476e38fda0" name="aef012cb2878441921a68bb476e38fda0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aef012cb2878441921a68bb476e38fda0">◆ </a></span>operator=() <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"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> & sf::SoundSource::operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1SoundSource.html">SoundSource</a> &&</td> <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">default</span><span class="mlabel">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move assignment. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a21553d4e8fcf136231dd8c7ad4630aba" name="a21553d4e8fcf136231dd8c7ad4630aba"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a21553d4e8fcf136231dd8c7ad4630aba">◆ </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">virtual void sf::SoundSource::pause </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Pause the sound source. </p>
|
|
<p>This function pauses the source if it was playing, otherwise (source already paused or stopped) it has no effect.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a6e1bbb1f247ed8743faf3b1ed6f2bc21" title="Start or resume playing the sound source.">play</a></code>, <code><a class="el" href="#a06501a25b12376befcc7ee1ed4865fda" title="Stop playing the sound source.">stop</a></code> </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a24b31c90af33c6bdc302f876abdf8a39">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a2285cedcbcb5f3c97828c664934dc0de">sf::SoundStream</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6e1bbb1f247ed8743faf3b1ed6f2bc21" name="a6e1bbb1f247ed8743faf3b1ed6f2bc21"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6e1bbb1f247ed8743faf3b1ed6f2bc21">◆ </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">virtual void sf::SoundSource::play </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Start or resume playing the sound source. </p>
|
|
<p>This function starts the source if it was stopped, resumes it if it was paused, and restarts it from the beginning if it was already playing.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause</a></code>, <code><a class="el" href="#a06501a25b12376befcc7ee1ed4865fda" title="Stop playing the sound source.">stop</a></code> </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a969d9c9c5e742ba91a39f7f12fed9096">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#af05290eb2c6a316790fb18c5912a5dd6">sf::SoundStream</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aa2adff44cd2f8b4e3c7315d7c2a45626" name="aa2adff44cd2f8b4e3c7315d7c2a45626"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aa2adff44cd2f8b4e3c7315d7c2a45626">◆ </a></span>setAttenuation()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setAttenuation </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>attenuation</em></span></td><td>)</td>
|
|
<td></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><code><a class="el" href="#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code>, <code><a class="el" href="#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound.">setMinDistance</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aba2cbcc0be18840880b54a112a0e69a1" name="aba2cbcc0be18840880b54a112a0e69a1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aba2cbcc0be18840880b54a112a0e69a1">◆ </a></span>setCone()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setCone </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="structsf_1_1SoundSource_1_1Cone.html">Cone</a> &</td> <td class="paramname"><span class="paramname"><em>cone</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the cone properties of the sound in the audio scene. </p>
|
|
<p>The cone defines how directional attenuation is applied. The default cone of a sound is (2 * PI, 2 * PI, 1).</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">cone</td><td><a class="el" href="structsf_1_1SoundSource_1_1Cone.html" title="Structure defining the properties of a directional cone.">Cone</a> properties of the sound in the scene</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#adee94455dfe9d1a87ec45d1afe09e092" title="Get the cone properties of the sound in the audio scene.">getCone</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac46223c70c01f43bb6a443001cdd0599" name="ac46223c70c01f43bb6a443001cdd0599"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac46223c70c01f43bb6a443001cdd0599">◆ </a></span>setDirection()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setDirection </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &</td> <td class="paramname"><span class="paramname"><em>direction</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the 3D direction of the sound in the audio scene. </p>
|
|
<p>The direction defines where the sound source is facing in 3D space. It will affect how the sound is attenuated if facing away from the listener. The default direction of a sound is (0, 0, -1).</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">direction</td><td>Direction of the sound in the scene</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a2d9b249242e403d0f2638977357995fd" title="Get the 3D direction of the sound in the audio scene.">getDirection</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aeae4c21b585e54814b6a8ca8542ddf49" name="aeae4c21b585e54814b6a8ca8542ddf49"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aeae4c21b585e54814b6a8ca8542ddf49">◆ </a></span>setDirectionalAttenuationFactor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setDirectionalAttenuationFactor </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>factor</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the directional attenuation factor of the sound. </p>
|
|
<p>Depending on the virtual position of an output channel relative to the listener (such as in surround sound setups), sounds will be attenuated when emitting them from certain channels. This factor determines how strong the attenuation based on output channel position relative to the listener is.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">factor</td><td>New directional attenuation factor to apply to the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#aa1ac48f196605eb96521344bc8eb93b5" title="Get the directional attenuation factor of the sound.">getDirectionalAttenuationFactor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2d229ff4e5f5d61bb12c1a6b94841f96" name="a2d229ff4e5f5d61bb12c1a6b94841f96"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2d229ff4e5f5d61bb12c1a6b94841f96">◆ </a></span>setDopplerFactor()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setDopplerFactor </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>factor</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the doppler factor of the sound. </p>
|
|
<p>The doppler factor determines how strong the doppler shift will be.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">factor</td><td>New doppler factor to apply to the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#af6eb03a66214b68bc2f4edb42952e6f5" title="Get the doppler factor of the sound.">getDopplerFactor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a93f431c479da8b7774af4f393099ada4" name="a93f431c479da8b7774af4f393099ada4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a93f431c479da8b7774af4f393099ada4">◆ </a></span>setEffectProcessor()</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::SoundSource::setEffectProcessor </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="#ab13ce12bd2ef4856511824557b07cce5">EffectProcessor</a></td> <td class="paramname"><span class="paramname"><em>effectProcessor</em></span></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>Set the effect processor to be applied to the sound. </p>
|
|
<p>The effect processor is a callable that will be called with sound data to be processed.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">effectProcessor</td><td>The effect processor to attach to this sound, attach an empty processor to disable processing </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Reimplemented in <a class="el" href="classsf_1_1Sound.html#ad35759080c15af30afec2493b59bec61">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a7593f4e30cde575c057d62ff1c47f1b3">sf::SoundStream</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a484275e6ecfa041ea9e690a8635c2212" name="a484275e6ecfa041ea9e690a8635c2212"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a484275e6ecfa041ea9e690a8635c2212">◆ </a></span>setMaxDistance()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setMaxDistance </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>distance</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the maximum distance of the sound. </p>
|
|
<p>The "maximum distance" of a sound is the minimum distance at which it is heard at its minimum volume. Closer than the maximum distance, it will start to fade in according to its attenuation factor. The default value of the maximum distance is the maximum value a float can represent.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">distance</td><td>New maximum distance of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a471e2644f3599ac583bca92072ed3eec" title="Get the maximum distance of the sound.">getMaxDistance</a></code>, <code><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="aaf799cceb2a8b3d5a93320c35a955fb1" name="aaf799cceb2a8b3d5a93320c35a955fb1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#aaf799cceb2a8b3d5a93320c35a955fb1">◆ </a></span>setMaxGain()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setMaxGain </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>gain</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the maximum gain of the sound. </p>
|
|
<p>When the sound is closer from the listener than the "minimum distance" the attenuated gain is clamped so it cannot go above the maximum gain value.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">gain</td><td>New maximum gain of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a706eddad92fa4cf16b108b8942b72f26" title="Get the maximum gain of the sound.">getMaxGain</a></code>, <code><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a75bbc2c34addc8b25a14edb908508afe" name="a75bbc2c34addc8b25a14edb908508afe"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a75bbc2c34addc8b25a14edb908508afe">◆ </a></span>setMinDistance()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setMinDistance </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>distance</em></span></td><td>)</td>
|
|
<td></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><code><a class="el" href="#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a></code>, <code><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae6789b20e1a7525d6a7611466e955f50" name="ae6789b20e1a7525d6a7611466e955f50"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae6789b20e1a7525d6a7611466e955f50">◆ </a></span>setMinGain()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setMinGain </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>gain</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the minimum gain of the sound. </p>
|
|
<p>When the sound is further away from the listener than the "maximum distance" the attenuated gain is clamped so it cannot go below the minimum gain value.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">gain</td><td>New minimum gain of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a08a8b71fc60a4549db55add457209829" title="Get the minimum gain of the sound.">getMinGain</a></code>, <code><a class="el" href="#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ad08a99b6f3492b940a2ef20c8d3cbc72" name="ad08a99b6f3492b940a2ef20c8d3cbc72"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad08a99b6f3492b940a2ef20c8d3cbc72">◆ </a></span>setPan()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setPan </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>pan</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the pan of the sound. </p>
|
|
<p>Using panning, a mono sound can be panned between stereo channels. When the pan is set to -1, the sound is played only on the left channel, when the pan is set to +1, the sound is played only on the right channel.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">pan</td><td>New pan to apply to the sound [-1, +1]</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a0fbe0259aa4fc8440d34d156bb8dd901" title="Get the pan of the sound.">getPan</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a72a13695ed48b7f7b55e7cd4431f4bb6" name="a72a13695ed48b7f7b55e7cd4431f4bb6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a72a13695ed48b7f7b55e7cd4431f4bb6">◆ </a></span>setPitch()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setPitch </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>pitch</em></span></td><td>)</td>
|
|
<td></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><code><a class="el" href="#a4736acc2c802f927544c9ce52a44a9e4" title="Get the pitch of the sound.">getPitch</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a17ba9ed01925395652181a7b2a7d3aef" name="a17ba9ed01925395652181a7b2a7d3aef"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a17ba9ed01925395652181a7b2a7d3aef">◆ </a></span>setPosition()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setPosition </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &</td> <td class="paramname"><span class="paramname"><em>position</em></span></td><td>)</td>
|
|
<td></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><code><a class="el" href="#a8d199521f55550c7a3b2b0f6950dffa1" title="Get the 3D position of the sound in the audio scene.">getPosition</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac478a8b813faf7dd575635b102081d0d" name="ac478a8b813faf7dd575635b102081d0d"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac478a8b813faf7dd575635b102081d0d">◆ </a></span>setRelativeToListener()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setRelativeToListener </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>relative</em></span></td><td>)</td>
|
|
<td></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 <code>false</code> (position is absolute).</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">relative</td><td><code>true</code> to set the position relative, <code>false</code> to set it absolute</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#adcdb4ef32c2f4481d34aff0b5c31534b" title="Tell whether the sound's position is relative to the listener or is absolute.">isRelativeToListener</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a6586a19a8d1060bdf93e3c4b6ee039a7" name="a6586a19a8d1060bdf93e3c4b6ee039a7"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a6586a19a8d1060bdf93e3c4b6ee039a7">◆ </a></span>setSpatializationEnabled()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setSpatializationEnabled </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>enabled</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set whether spatialization of the sound is enabled. </p>
|
|
<p>Spatialization is the application of various effects to simulate a sound being emitted at a virtual position in 3D space and exhibiting various physical phenomena such as directional attenuation and doppler shift.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">enabled</td><td><code>true</code> to enable spatialization, <code>false</code> to disable</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a805a8bba4ce7ac1f04fdb073974fee9b" title="Tell whether spatialization of the sound is enabled.">isSpatializationEnabled</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a3ed894bdb323e26518c9e1548fc3488c" name="a3ed894bdb323e26518c9e1548fc3488c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a3ed894bdb323e26518c9e1548fc3488c">◆ </a></span>setVelocity()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setVelocity </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &</td> <td class="paramname"><span class="paramname"><em>velocity</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the 3D velocity of the sound in the audio scene. </p>
|
|
<p>The velocity is used to determine how to doppler shift the sound. Sounds moving towards the listener will be perceived to have a higher pitch and sounds moving away from the listener will be perceived to have a lower pitch.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">velocity</td><td>Velocity of the sound in the scene</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a9ae37256230fe3bce3ddab5edf8936a1" title="Get the 3D velocity of the sound in the audio scene.">getVelocity</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2f192f2b49fb8e2b82f3498d3663fcc2" name="a2f192f2b49fb8e2b82f3498d3663fcc2"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2f192f2b49fb8e2b82f3498d3663fcc2">◆ </a></span>setVolume()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setVolume </td>
|
|
<td>(</td>
|
|
<td class="paramtype">float</td> <td class="paramname"><span class="paramname"><em>volume</em></span></td><td>)</td>
|
|
<td></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><code><a class="el" href="#a04243fb5edf64561689b1d58953fc4ce" title="Get the volume of the sound.">getVolume</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a06501a25b12376befcc7ee1ed4865fda" name="a06501a25b12376befcc7ee1ed4865fda"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a06501a25b12376befcc7ee1ed4865fda">◆ </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">virtual void sf::SoundSource::stop </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Stop playing the sound source. </p>
|
|
<p>This function stops the source if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike <code><a class="el" href="#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause()</a></code>).</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a6e1bbb1f247ed8743faf3b1ed6f2bc21" title="Start or resume playing the sound source.">play</a></code>, <code><a class="el" href="#a21553d4e8fcf136231dd8c7ad4630aba" title="Pause the sound source.">pause</a></code> </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Sound.html#a90c9112782d5bc424a8e9e3ee7ecef19">sf::Sound</a>, and <a class="el" href="classsf_1_1SoundStream.html#a781fe51135fdc5679fe22a5665110143">sf::SoundStream</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="SoundSource_8hpp_source.html">SoundSource.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 © Laurent Gomila ::
|
|
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|