2109 lines
127 KiB
HTML
2109 lines
127 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_1SoundStream.html">SoundStream</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_1SoundStream-members.html">List of all members</a> </div>
|
|
<div class="headertitle"><div class="title">sf::SoundStream Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span><div class="ingroups"><a class="el" href="group__audio.html">Audio module</a></div></div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
|
|
<p>Abstract base class for streamed audio sources.
|
|
<a href="#details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="SoundStream_8hpp_source.html">SFML/Audio/SoundStream.hpp</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for sf::SoundStream:</div>
|
|
<div class="dyncontent">
|
|
<div class="center">
|
|
<img src="classsf_1_1SoundStream.png" usemap="#sf::SoundStream_map" alt=""/>
|
|
<map id="sf::SoundStream_map" name="sf::SoundStream_map">
|
|
<area href="classsf_1_1SoundSource.html" title="Base class defining a sound's properties." alt="sf::SoundSource" shape="rect" coords="0,56,115,80"/>
|
|
<area href="classsf_1_1AudioResource.html" title="Base class for classes that require an audio device." alt="sf::AudioResource" shape="rect" coords="0,0,115,24"/>
|
|
<area href="classsf_1_1Music.html" title="Streamed music played from an audio file." alt="sf::Music" shape="rect" coords="0,168,115,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_1SoundStream_1_1Chunk.html">Chunk</a></td></tr>
|
|
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Structure defining a chunk of audio data to stream. <a href="structsf_1_1SoundStream_1_1Chunk.html#details">More...</a><br /></td></tr>
|
|
<tr class="separator:"><td class="memSeparator" colspan="2"> </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="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> { <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03ac23e2b09ebe6bf4cb5e2a9abe85c0be2">Stopped</a>
|
|
, <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03ae99180abf47a8b3a856e0bcb2656990a">Paused</a>
|
|
, <a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03ac9dbb2b7c84159b632d71e512eba8428">Playing</a>
|
|
}</td></tr>
|
|
<tr class="memdesc:ac43af72c98c077500b239bc75b812f03"><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of the sound source states. <a href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">More...</a><br /></td></tr>
|
|
<tr class="separator:ac43af72c98c077500b239bc75b812f03"><td class="memSeparator" colspan="2"> </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="classsf_1_1SoundSource.html#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:ad0cec94fbf9e886dd9bdce19d98f4729" id="r_ad0cec94fbf9e886dd9bdce19d98f4729"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ad0cec94fbf9e886dd9bdce19d98f4729">~SoundStream</a> () override</td></tr>
|
|
<tr class="memdesc:ad0cec94fbf9e886dd9bdce19d98f4729"><td class="mdescLeft"> </td><td class="mdescRight">Destructor. <br /></td></tr>
|
|
<tr class="separator:ad0cec94fbf9e886dd9bdce19d98f4729"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1b60edd617d16ed4e056715b76928de4" id="r_a1b60edd617d16ed4e056715b76928de4"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1b60edd617d16ed4e056715b76928de4">SoundStream</a> (<a class="el" href="classsf_1_1SoundStream.html">SoundStream</a> &&) noexcept</td></tr>
|
|
<tr class="memdesc:a1b60edd617d16ed4e056715b76928de4"><td class="mdescLeft"> </td><td class="mdescRight">Move constructor. <br /></td></tr>
|
|
<tr class="separator:a1b60edd617d16ed4e056715b76928de4"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a25ebfb535c173096524f656fa63ede23" id="r_a25ebfb535c173096524f656fa63ede23"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundStream.html">SoundStream</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="#a25ebfb535c173096524f656fa63ede23">operator=</a> (<a class="el" href="classsf_1_1SoundStream.html">SoundStream</a> &&) noexcept</td></tr>
|
|
<tr class="memdesc:a25ebfb535c173096524f656fa63ede23"><td class="mdescLeft"> </td><td class="mdescRight">Move assignment. <br /></td></tr>
|
|
<tr class="separator:a25ebfb535c173096524f656fa63ede23"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af05290eb2c6a316790fb18c5912a5dd6" id="r_af05290eb2c6a316790fb18c5912a5dd6"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#af05290eb2c6a316790fb18c5912a5dd6">play</a> () override</td></tr>
|
|
<tr class="memdesc:af05290eb2c6a316790fb18c5912a5dd6"><td class="mdescLeft"> </td><td class="mdescRight">Start or resume playing the audio stream. <br /></td></tr>
|
|
<tr class="separator:af05290eb2c6a316790fb18c5912a5dd6"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a2285cedcbcb5f3c97828c664934dc0de" id="r_a2285cedcbcb5f3c97828c664934dc0de"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a2285cedcbcb5f3c97828c664934dc0de">pause</a> () override</td></tr>
|
|
<tr class="memdesc:a2285cedcbcb5f3c97828c664934dc0de"><td class="mdescLeft"> </td><td class="mdescRight">Pause the audio stream. <br /></td></tr>
|
|
<tr class="separator:a2285cedcbcb5f3c97828c664934dc0de"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a781fe51135fdc5679fe22a5665110143" id="r_a781fe51135fdc5679fe22a5665110143"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a781fe51135fdc5679fe22a5665110143">stop</a> () override</td></tr>
|
|
<tr class="memdesc:a781fe51135fdc5679fe22a5665110143"><td class="mdescLeft"> </td><td class="mdescRight">Stop playing the audio stream. <br /></td></tr>
|
|
<tr class="separator:a781fe51135fdc5679fe22a5665110143"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1f70933912dd9498f4dc99feefed27f3" id="r_a1f70933912dd9498f4dc99feefed27f3"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1f70933912dd9498f4dc99feefed27f3">getChannelCount</a> () const</td></tr>
|
|
<tr class="memdesc:a1f70933912dd9498f4dc99feefed27f3"><td class="mdescLeft"> </td><td class="mdescRight">Return the number of channels of the stream. <br /></td></tr>
|
|
<tr class="separator:a1f70933912dd9498f4dc99feefed27f3"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7da448dc40d81a33b8dc555fbf0d3fbf" id="r_a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="memItemLeft" align="right" valign="top">unsigned int </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7da448dc40d81a33b8dc555fbf0d3fbf">getSampleRate</a> () const</td></tr>
|
|
<tr class="memdesc:a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="mdescLeft"> </td><td class="mdescRight">Get the stream sample rate of the stream. <br /></td></tr>
|
|
<tr class="separator:a7da448dc40d81a33b8dc555fbf0d3fbf"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a1ae6bfce0ec385a11e87697323227799" id="r_a1ae6bfce0ec385a11e87697323227799"><td class="memItemLeft" align="right" valign="top">std::vector< <a class="el" href="group__audio.html#ga9800c7f3d5e7a9c9310f707b2c995ff3">SoundChannel</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="#a1ae6bfce0ec385a11e87697323227799">getChannelMap</a> () const</td></tr>
|
|
<tr class="memdesc:a1ae6bfce0ec385a11e87697323227799"><td class="mdescLeft"> </td><td class="mdescRight">Get the map of position in sample frame to sound channel. <br /></td></tr>
|
|
<tr class="separator:a1ae6bfce0ec385a11e87697323227799"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a607e74492ca84764be563f36d75a1384" id="r_a607e74492ca84764be563f36d75a1384"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a607e74492ca84764be563f36d75a1384">getStatus</a> () const override</td></tr>
|
|
<tr class="memdesc:a607e74492ca84764be563f36d75a1384"><td class="mdescLeft"> </td><td class="mdescRight">Get the current status of the stream (stopped, paused, playing) <br /></td></tr>
|
|
<tr class="separator:a607e74492ca84764be563f36d75a1384"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:af416a5f84c8750d2acb9821d78bc8646" id="r_af416a5f84c8750d2acb9821d78bc8646"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#af416a5f84c8750d2acb9821d78bc8646">setPlayingOffset</a> (<a class="el" href="classsf_1_1Time.html">Time</a> timeOffset)</td></tr>
|
|
<tr class="memdesc:af416a5f84c8750d2acb9821d78bc8646"><td class="mdescLeft"> </td><td class="mdescRight">Change the current playing position of the stream. <br /></td></tr>
|
|
<tr class="separator:af416a5f84c8750d2acb9821d78bc8646"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ae288f3c72edbad9cc7ee938ce5b907c1" id="r_ae288f3c72edbad9cc7ee938ce5b907c1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1Time.html">Time</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="#ae288f3c72edbad9cc7ee938ce5b907c1">getPlayingOffset</a> () const</td></tr>
|
|
<tr class="memdesc:ae288f3c72edbad9cc7ee938ce5b907c1"><td class="mdescLeft"> </td><td class="mdescRight">Get the current playing position of the stream. <br /></td></tr>
|
|
<tr class="separator:ae288f3c72edbad9cc7ee938ce5b907c1"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a0c14b35d1dc64bf10e02b7a876540966" id="r_a0c14b35d1dc64bf10e02b7a876540966"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a0c14b35d1dc64bf10e02b7a876540966">setLooping</a> (bool loop)</td></tr>
|
|
<tr class="memdesc:a0c14b35d1dc64bf10e02b7a876540966"><td class="mdescLeft"> </td><td class="mdescRight">Set whether or not the stream should loop after reaching the end. <br /></td></tr>
|
|
<tr class="separator:a0c14b35d1dc64bf10e02b7a876540966"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4f72aa9d4e185b4c02ffbb97075c7e82" id="r_a4f72aa9d4e185b4c02ffbb97075c7e82"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4f72aa9d4e185b4c02ffbb97075c7e82">isLooping</a> () const</td></tr>
|
|
<tr class="memdesc:a4f72aa9d4e185b4c02ffbb97075c7e82"><td class="mdescLeft"> </td><td class="mdescRight">Tell whether or not the stream is in loop mode. <br /></td></tr>
|
|
<tr class="separator:a4f72aa9d4e185b4c02ffbb97075c7e82"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a7593f4e30cde575c057d62ff1c47f1b3" id="r_a7593f4e30cde575c057d62ff1c47f1b3"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a7593f4e30cde575c057d62ff1c47f1b3">setEffectProcessor</a> (<a class="el" href="classsf_1_1SoundSource.html#ab13ce12bd2ef4856511824557b07cce5">EffectProcessor</a> effectProcessor) override</td></tr>
|
|
<tr class="memdesc:a7593f4e30cde575c057d62ff1c47f1b3"><td class="mdescLeft"> </td><td class="mdescRight">Set the effect processor to be applied to the sound. <br /></td></tr>
|
|
<tr class="separator:a7593f4e30cde575c057d62ff1c47f1b3"><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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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:a4736acc2c802f927544c9ce52a44a9e4" id="r_a4736acc2c802f927544c9ce52a44a9e4"><td class="memItemLeft" align="right" valign="top">float </td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4">getPitch</a> () const</td></tr>
|
|
<tr class="memdesc:a4736acc2c802f927544c9ce52a44a9e4"><td class="mdescLeft"> </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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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="classsf_1_1SoundSource.html#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>
|
|
</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:a769d08f4c3c6b4340ef3a838329d2e5c" id="r_a769d08f4c3c6b4340ef3a838329d2e5c"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="#a769d08f4c3c6b4340ef3a838329d2e5c">SoundStream</a> ()</td></tr>
|
|
<tr class="memdesc:a769d08f4c3c6b4340ef3a838329d2e5c"><td class="mdescLeft"> </td><td class="mdescRight">Default constructor. <br /></td></tr>
|
|
<tr class="separator:a769d08f4c3c6b4340ef3a838329d2e5c"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a4a698d4096306ac1792fa320068aa5d0" id="r_a4a698d4096306ac1792fa320068aa5d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a4a698d4096306ac1792fa320068aa5d0">initialize</a> (unsigned int channelCount, unsigned int sampleRate, const std::vector< <a class="el" href="group__audio.html#ga9800c7f3d5e7a9c9310f707b2c995ff3">SoundChannel</a> > &channelMap)</td></tr>
|
|
<tr class="memdesc:a4a698d4096306ac1792fa320068aa5d0"><td class="mdescLeft"> </td><td class="mdescRight">Define the audio stream parameters. <br /></td></tr>
|
|
<tr class="separator:a4a698d4096306ac1792fa320068aa5d0"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a968ec024a6e45490962c8a1121cb7c5f" id="r_a968ec024a6e45490962c8a1121cb7c5f"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="#a968ec024a6e45490962c8a1121cb7c5f">onGetData</a> (<a class="el" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a> &data)=0</td></tr>
|
|
<tr class="memdesc:a968ec024a6e45490962c8a1121cb7c5f"><td class="mdescLeft"> </td><td class="mdescRight">Request a new chunk of audio samples from the stream source. <br /></td></tr>
|
|
<tr class="separator:a968ec024a6e45490962c8a1121cb7c5f"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:a907036dd2ca7d3af5ead316e54b75997" id="r_a907036dd2ca7d3af5ead316e54b75997"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="#a907036dd2ca7d3af5ead316e54b75997">onSeek</a> (<a class="el" href="classsf_1_1Time.html">Time</a> timeOffset)=0</td></tr>
|
|
<tr class="memdesc:a907036dd2ca7d3af5ead316e54b75997"><td class="mdescLeft"> </td><td class="mdescRight">Change the current playing position in the stream source. <br /></td></tr>
|
|
<tr class="separator:a907036dd2ca7d3af5ead316e54b75997"><td class="memSeparator" colspan="2"> </td></tr>
|
|
<tr class="memitem:ac7c8b90227522b48f357ac856d6e0853" id="r_ac7c8b90227522b48f357ac856d6e0853"><td class="memItemLeft" align="right" valign="top">virtual std::optional< std::uint64_t > </td><td class="memItemRight" valign="bottom"><a class="el" href="#ac7c8b90227522b48f357ac856d6e0853">onLoop</a> ()</td></tr>
|
|
<tr class="memdesc:ac7c8b90227522b48f357ac856d6e0853"><td class="mdescLeft"> </td><td class="mdescRight">Change the current playing position in the stream source to the beginning of the loop. <br /></td></tr>
|
|
<tr class="separator:ac7c8b90227522b48f357ac856d6e0853"><td class="memSeparator" colspan="2"> </td></tr>
|
|
</table>
|
|
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
|
|
<div class="textblock"><p>Abstract base class for streamed audio sources. </p>
|
|
<p>Unlike audio buffers (see <code><a class="el" href="classsf_1_1SoundBuffer.html" title="Storage for audio samples defining a sound.">sf::SoundBuffer</a></code>), audio streams are never completely loaded in memory.</p>
|
|
<p>Instead, the audio data is acquired continuously while the stream is playing. This behavior allows to play a sound with no loading delay, and keeps the memory consumption very low.</p>
|
|
<p><a class="el" href="classsf_1_1Sound.html" title="Regular sound that can be played in the audio environment.">Sound</a> sources that need to be streamed are usually big files (compressed audio musics that would eat hundreds of MB in memory) or files that would take a lot of time to be received (sounds played over the network).</p>
|
|
<p><code><a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources.">sf::SoundStream</a></code> is a base class that doesn't care about the stream source, which is left to the derived class. SFML provides a built-in specialization for big files (see <code><a class="el" href="classsf_1_1Music.html" title="Streamed music played from an audio file.">sf::Music</a></code>). No network stream source is provided, but you can write your own by combining this class with the network module.</p>
|
|
<p>A derived class has to override two virtual functions: </p><ul>
|
|
<li><code>onGetData</code> fills a new chunk of audio data to be played </li>
|
|
<li><code>onSeek</code> changes the current playing position in the source</li>
|
|
</ul>
|
|
<p>It is important to note that each <a class="el" href="classsf_1_1SoundStream.html" title="Abstract base class for streamed audio sources.">SoundStream</a> is played in its own separate thread, so that the streaming loop doesn't block the rest of the program. In particular, the <code>onGetData</code> and <code>onSeek</code> virtual functions may sometimes be called from this separate thread. It is important to keep this in mind, because you may have to take care of synchronization issues if you share data between threads.</p>
|
|
<p>Usage example: </p><div class="fragment"><div class="line"><span class="keyword">class </span>CustomStream : <span class="keyword">public</span> <a class="code hl_class" href="classsf_1_1SoundStream.html">sf::SoundStream</a></div>
|
|
<div class="line">{</div>
|
|
<div class="line"><span class="keyword">public</span>:</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> [[nodiscard]] <span class="keywordtype">bool</span> open(<span class="keyword">const</span> std::string& location)</div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> <span class="comment">// Open the source and get audio settings</span></div>
|
|
<div class="line"> ...</div>
|
|
<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> channelCount = 2; <span class="comment">// Stereo</span></div>
|
|
<div class="line"> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> sampleRate = 44100; <span class="comment">// 44100 Hz</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Initialize the stream -- important!</span></div>
|
|
<div class="line"> <a class="code hl_function" href="#a4a698d4096306ac1792fa320068aa5d0">initialize</a>(channelCount, sampleRate, {<a class="code hl_enumvalue" href="group__audio.html#gga9800c7f3d5e7a9c9310f707b2c995ff3a3a86c1ecef856c6360b14ee920abd2d4">sf::SoundChannel::FrontLeft</a>, <a class="code hl_enumvalue" href="group__audio.html#gga9800c7f3d5e7a9c9310f707b2c995ff3a17a1a1897fa234ffd995f32ff31c4075">sf::SoundChannel::FrontRight</a>});</div>
|
|
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"> }</div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="keyword">private</span>:</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="keywordtype">bool</span> <a class="code hl_function" href="#a968ec024a6e45490962c8a1121cb7c5f">onGetData</a>(Chunk& data)<span class="keyword"> override</span></div>
|
|
<div class="line"><span class="keyword"> </span>{</div>
|
|
<div class="line"> <span class="comment">// Fill the chunk with audio data from the stream source</span></div>
|
|
<div class="line"> <span class="comment">// (note: must not be empty if you want to continue playing)</span></div>
|
|
<div class="line"> data.samples = ...;</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Return true to continue playing</span></div>
|
|
<div class="line"> data.sampleCount = ...;</div>
|
|
<div class="line"> <span class="keywordflow">return</span> <span class="keyword">true</span>;</div>
|
|
<div class="line"> }</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="keywordtype">void</span> <a class="code hl_function" href="#a907036dd2ca7d3af5ead316e54b75997">onSeek</a>(<a class="code hl_class" href="classsf_1_1Time.html">sf::Time</a> timeOffset)<span class="keyword"> override</span></div>
|
|
<div class="line"><span class="keyword"> </span>{</div>
|
|
<div class="line"> <span class="comment">// Change the current position in the stream source</span></div>
|
|
<div class="line"> ...</div>
|
|
<div class="line"> }</div>
|
|
<div class="line">};</div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="comment">// Usage</span></div>
|
|
<div class="line">CustomStream stream;</div>
|
|
<div class="line">stream.open(<span class="stringliteral">"path/to/stream"</span>);</div>
|
|
<div class="line">stream.play();</div>
|
|
<div class="ttc" id="aclasssf_1_1SoundStream_html"><div class="ttname"><a href="classsf_1_1SoundStream.html">sf::SoundStream</a></div><div class="ttdoc">Abstract base class for streamed audio sources.</div><div class="ttdef"><b>Definition</b> <a href="SoundStream_8hpp_source.html#l00051">SoundStream.hpp:52</a></div></div>
|
|
<div class="ttc" id="aclasssf_1_1SoundStream_html_a4a698d4096306ac1792fa320068aa5d0"><div class="ttname"><a href="#a4a698d4096306ac1792fa320068aa5d0">sf::SoundStream::initialize</a></div><div class="ttdeci">void initialize(unsigned int channelCount, unsigned int sampleRate, const std::vector< SoundChannel > &channelMap)</div><div class="ttdoc">Define the audio stream parameters.</div></div>
|
|
<div class="ttc" id="aclasssf_1_1SoundStream_html_a907036dd2ca7d3af5ead316e54b75997"><div class="ttname"><a href="#a907036dd2ca7d3af5ead316e54b75997">sf::SoundStream::onSeek</a></div><div class="ttdeci">virtual void onSeek(Time timeOffset)=0</div><div class="ttdoc">Change the current playing position in the stream source.</div></div>
|
|
<div class="ttc" id="aclasssf_1_1SoundStream_html_a968ec024a6e45490962c8a1121cb7c5f"><div class="ttname"><a href="#a968ec024a6e45490962c8a1121cb7c5f">sf::SoundStream::onGetData</a></div><div class="ttdeci">virtual bool onGetData(Chunk &data)=0</div><div class="ttdoc">Request a new chunk of audio samples from the stream source.</div></div>
|
|
<div class="ttc" id="aclasssf_1_1Time_html"><div class="ttname"><a href="classsf_1_1Time.html">sf::Time</a></div><div class="ttdoc">Represents a time value.</div><div class="ttdef"><b>Definition</b> <a href="Time_8hpp_source.html#l00041">Time.hpp:42</a></div></div>
|
|
<div class="ttc" id="agroup__audio_html_gga9800c7f3d5e7a9c9310f707b2c995ff3a17a1a1897fa234ffd995f32ff31c4075"><div class="ttname"><a href="group__audio.html#gga9800c7f3d5e7a9c9310f707b2c995ff3a17a1a1897fa234ffd995f32ff31c4075">sf::SoundChannel::FrontRight</a></div><div class="ttdeci">@ FrontRight</div></div>
|
|
<div class="ttc" id="agroup__audio_html_gga9800c7f3d5e7a9c9310f707b2c995ff3a3a86c1ecef856c6360b14ee920abd2d4"><div class="ttname"><a href="group__audio.html#gga9800c7f3d5e7a9c9310f707b2c995ff3a3a86c1ecef856c6360b14ee920abd2d4">sf::SoundChannel::FrontLeft</a></div><div class="ttdeci">@ FrontLeft</div></div>
|
|
</div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1Music.html" title="Streamed music played from an audio file.">sf::Music</a></code> </dd></dl>
|
|
|
|
<p class="definition">Definition at line <a class="el" href="SoundStream_8hpp_source.html#l00051">51</a> of file <a class="el" href="SoundStream_8hpp_source.html">SoundStream.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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">using <a class="el" href="classsf_1_1SoundSource.html#ab13ce12bd2ef4856511824557b07cce5">sf::SoundSource::EffectProcessor</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
<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="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">sf::SoundSource::Status</a></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">strong</span><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Enumeration of the sound source states. </p>
|
|
<table class="fieldtable">
|
|
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="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="ad0cec94fbf9e886dd9bdce19d98f4729" name="ad0cec94fbf9e886dd9bdce19d98f4729"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ad0cec94fbf9e886dd9bdce19d98f4729">◆ </a></span>~SoundStream()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::SoundStream::~SoundStream </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Destructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1b60edd617d16ed4e056715b76928de4" name="a1b60edd617d16ed4e056715b76928de4"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1b60edd617d16ed4e056715b76928de4">◆ </a></span>SoundStream() <span class="overload">[1/2]</span></h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">sf::SoundStream::SoundStream </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1SoundStream.html">SoundStream</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">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move constructor. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a769d08f4c3c6b4340ef3a838329d2e5c" name="a769d08f4c3c6b4340ef3a838329d2e5c"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a769d08f4c3c6b4340ef3a838329d2e5c">◆ </a></span>SoundStream() <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">sf::SoundStream::SoundStream </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> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Default constructor. </p>
|
|
<p>This constructor is only meant to be called by derived classes. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<h2 class="groupheader">Member Function Documentation</h2>
|
|
<a id="a8ad7dafb4f1b4afbc638cebe24f48cc9" 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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the attenuation factor of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Attenuation factor of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#aa2adff44cd2f8b4e3c7315d7c2a45626" title="Set the attenuation factor of the sound.">setAttenuation</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1f70933912dd9498f4dc99feefed27f3" name="a1f70933912dd9498f4dc99feefed27f3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1f70933912dd9498f4dc99feefed27f3">◆ </a></span>getChannelCount()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned int sf::SoundStream::getChannelCount </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>Return the number of channels of the stream. </p>
|
|
<p>1 channel means a mono sound, 2 means stereo, etc.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Number of channels </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a1ae6bfce0ec385a11e87697323227799" name="a1ae6bfce0ec385a11e87697323227799"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a1ae6bfce0ec385a11e87697323227799">◆ </a></span>getChannelMap()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">std::vector< <a class="el" href="group__audio.html#ga9800c7f3d5e7a9c9310f707b2c995ff3">SoundChannel</a> > sf::SoundStream::getChannelMap </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 map of position in sample frame to sound channel. </p>
|
|
<p>This is used to map a sample in the sample stream to a position during spatialization.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Map of position in sample frame to sound channel </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 class="mlabel">inherited</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>Cone properties of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#a484275e6ecfa041ea9e690a8635c2212" title="Set the maximum distance of the sound.">setMaxDistance</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#aaf799cceb2a8b3d5a93320c35a955fb1" title="Set the maximum gain of the sound.">setMaxGain</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the minimum distance of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Minimum distance of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a75bbc2c34addc8b25a14edb908508afe" title="Set the minimum distance of the sound.">setMinDistance</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#ae6789b20e1a7525d6a7611466e955f50" title="Set the minimum gain of the sound.">setMinGain</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the pitch of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Pitch of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a72a13695ed48b7f7b55e7cd4431f4bb6" title="Set the pitch of the sound.">setPitch</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ae288f3c72edbad9cc7ee938ce5b907c1" name="ae288f3c72edbad9cc7ee938ce5b907c1"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ae288f3c72edbad9cc7ee938ce5b907c1">◆ </a></span>getPlayingOffset()</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_1Time.html">Time</a> sf::SoundStream::getPlayingOffset </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 current playing position of the stream. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Current playing position, from the beginning of the stream</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#af416a5f84c8750d2acb9821d78bc8646" title="Change the current playing position of the stream.">setPlayingOffset</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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the 3D position of the sound in the audio scene. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Position of the sound</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a17ba9ed01925395652181a7b2a7d3aef" title="Set the 3D position of the sound in the audio scene.">setPosition</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7da448dc40d81a33b8dc555fbf0d3fbf" name="a7da448dc40d81a33b8dc555fbf0d3fbf"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7da448dc40d81a33b8dc555fbf0d3fbf">◆ </a></span>getSampleRate()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">unsigned int sf::SoundStream::getSampleRate </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 stream sample rate of the stream. </p>
|
|
<p>The sample rate is the number of audio samples played per second. The higher, the better the quality.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Sample rate, in number of samples per second </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a607e74492ca84764be563f36d75a1384" name="a607e74492ca84764be563f36d75a1384"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a607e74492ca84764be563f36d75a1384">◆ </a></span>getStatus()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname"><a class="el" href="classsf_1_1SoundSource.html#ac43af72c98c077500b239bc75b812f03">Status</a> sf::SoundStream::getStatus </td>
|
|
<td>(</td>
|
|
<td class="paramname"><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">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the current status of the stream (stopped, paused, playing) </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Current status </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#ab4d68d465eb18709d38e164a5c0ee2c4">sf::SoundSource</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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Get the volume of the sound. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd>Volume of the sound, in the range [0, 100]</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a2f192f2b49fb8e2b82f3498d3663fcc2" title="Set the volume of the sound.">setVolume</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4a698d4096306ac1792fa320068aa5d0" name="a4a698d4096306ac1792fa320068aa5d0"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4a698d4096306ac1792fa320068aa5d0">◆ </a></span>initialize()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::initialize </td>
|
|
<td>(</td>
|
|
<td class="paramtype">unsigned int</td> <td class="paramname"><span class="paramname"><em>channelCount</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">unsigned int</td> <td class="paramname"><span class="paramname"><em>sampleRate</em></span>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">const std::vector< <a class="el" href="group__audio.html#ga9800c7f3d5e7a9c9310f707b2c995ff3">SoundChannel</a> > &</td> <td class="paramname"><span class="paramname"><em>channelMap</em></span> )</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Define the audio stream parameters. </p>
|
|
<p>This function must be called by derived classes as soon as they know the audio settings of the stream to play. Any attempt to manipulate the stream (<code><a class="el" href="#af05290eb2c6a316790fb18c5912a5dd6" title="Start or resume playing the audio stream.">play()</a></code>, ...) before calling this function will fail. It can be called multiple times if the settings of the audio stream change, but only when the stream is stopped.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">channelCount</td><td>Number of channels of the stream </td></tr>
|
|
<tr><td class="paramname">sampleRate</td><td>Sample rate, in samples per second </td></tr>
|
|
<tr><td class="paramname">channelMap</td><td>Map of position in sample frame to sound channel </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a4f72aa9d4e185b4c02ffbb97075c7e82" name="a4f72aa9d4e185b4c02ffbb97075c7e82"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a4f72aa9d4e185b4c02ffbb97075c7e82">◆ </a></span>isLooping()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">bool sf::SoundStream::isLooping </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 or not the stream is in loop mode. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if the stream is looping, <code>false</code> otherwise</dd></dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a0c14b35d1dc64bf10e02b7a876540966" title="Set whether or not the stream should loop after reaching the end.">setLooping</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 class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Tell whether the sound's position is relative to the listener or is absolute. </p>
|
|
<dl class="section return"><dt>Returns</dt><dd><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="classsf_1_1SoundSource.html#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 class="mlabel">inherited</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="classsf_1_1SoundSource.html#a6586a19a8d1060bdf93e3c4b6ee039a7" title="Set whether spatialization of the sound is enabled.">setSpatializationEnabled</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a968ec024a6e45490962c8a1121cb7c5f" name="a968ec024a6e45490962c8a1121cb7c5f"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a968ec024a6e45490962c8a1121cb7c5f">◆ </a></span>onGetData()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool sf::SoundStream::onGetData </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="structsf_1_1SoundStream_1_1Chunk.html">Chunk</a> &</td> <td class="paramname"><span class="paramname"><em>data</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">nodiscard</span><span class="mlabel">protected</span><span class="mlabel">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Request a new chunk of audio samples from the stream source. </p>
|
|
<p>This function must be overridden by derived classes to provide the audio samples to play. It is called continuously by the streaming loop, in a separate thread. The source can choose to stop the streaming loop at any time, by returning <code>false</code> to the caller. If you return <code>true</code> (i.e. continue streaming) it is important that the returned array of samples is not empty; this would stop the stream due to an internal limitation.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">data</td><td><a class="el" href="structsf_1_1SoundStream_1_1Chunk.html" title="Structure defining a chunk of audio data to stream.">Chunk</a> of data to fill</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section return"><dt>Returns</dt><dd><code>true</code> to continue playback, <code>false</code> to stop </dd></dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Music.html#a7f6dd1344f23285e13a26a46d1bb9f5c">sf::Music</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="ac7c8b90227522b48f357ac856d6e0853" name="ac7c8b90227522b48f357ac856d6e0853"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#ac7c8b90227522b48f357ac856d6e0853">◆ </a></span>onLoop()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual std::optional< std::uint64_t > sf::SoundStream::onLoop </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">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Change the current playing position in the stream source to the beginning of the loop. </p>
|
|
<p>This function can be overridden by derived classes to allow implementation of custom loop points. Otherwise, it just calls <code>onSeek(Time::Zero)</code> and returns 0.</p>
|
|
<dl class="section return"><dt>Returns</dt><dd>The seek position after looping (or <code>std::nullopt</code> if there's no loop) </dd></dl>
|
|
|
|
<p>Reimplemented in <a class="el" href="classsf_1_1Music.html#a1edba64c835fd76ba474965dee216aaf">sf::Music</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a907036dd2ca7d3af5ead316e54b75997" name="a907036dd2ca7d3af5ead316e54b75997"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a907036dd2ca7d3af5ead316e54b75997">◆ </a></span>onSeek()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void sf::SoundStream::onSeek </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Time.html">Time</a></td> <td class="paramname"><span class="paramname"><em>timeOffset</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">pure virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Change the current playing position in the stream source. </p>
|
|
<p>This function must be overridden by derived classes to allow random seeking into the stream source.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">timeOffset</td><td>New playing position, relative to the beginning of the stream </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
<p>Implemented in <a class="el" href="classsf_1_1Music.html#a1256e51d366ae951408dc287f4cf486c">sf::Music</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a25ebfb535c173096524f656fa63ede23" name="a25ebfb535c173096524f656fa63ede23"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a25ebfb535c173096524f656fa63ede23">◆ </a></span>operator=()</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_1SoundStream.html">SoundStream</a> & sf::SoundStream::operator= </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1SoundStream.html">SoundStream</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">noexcept</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Move assignment. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a2285cedcbcb5f3c97828c664934dc0de" name="a2285cedcbcb5f3c97828c664934dc0de"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a2285cedcbcb5f3c97828c664934dc0de">◆ </a></span>pause()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::pause </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Pause the audio stream. </p>
|
|
<p>This function pauses the stream if it was playing, otherwise (stream already paused or stopped) it has no effect.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#af05290eb2c6a316790fb18c5912a5dd6" title="Start or resume playing the audio stream.">play</a></code>, <code><a class="el" href="#a781fe51135fdc5679fe22a5665110143" title="Stop playing the audio stream.">stop</a></code> </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a21553d4e8fcf136231dd8c7ad4630aba">sf::SoundSource</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af05290eb2c6a316790fb18c5912a5dd6" name="af05290eb2c6a316790fb18c5912a5dd6"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af05290eb2c6a316790fb18c5912a5dd6">◆ </a></span>play()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::play </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Start or resume playing the audio stream. </p>
|
|
<p>This function starts the stream if it was stopped, resumes it if it was paused, and restarts it from the beginning if it was already playing. This function uses its own thread so that it doesn't block the rest of the program while the stream is played.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a2285cedcbcb5f3c97828c664934dc0de" title="Pause the audio stream.">pause</a></code>, <code><a class="el" href="#a781fe51135fdc5679fe22a5665110143" title="Stop playing the audio stream.">stop</a></code> </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a6e1bbb1f247ed8743faf3b1ed6f2bc21">sf::SoundSource</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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the attenuation factor of the sound. </p>
|
|
<p>The attenuation is a multiplicative factor which makes the sound more or less loud according to its distance from the listener. An attenuation of 0 will produce a non-attenuated sound, i.e. its volume will always be the same whether it is heard from near or from far. On the other hand, an attenuation value such as 100 will make the sound fade out very quickly as it gets further from the listener. The default value of the attenuation is 1.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">attenuation</td><td>New attenuation factor of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a8ad7dafb4f1b4afbc638cebe24f48cc9" title="Get the attenuation factor of the sound.">getAttenuation</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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>Cone 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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the 3D 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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#af6eb03a66214b68bc2f4edb42952e6f5" title="Get the doppler factor of the sound.">getDopplerFactor</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a7593f4e30cde575c057d62ff1c47f1b3" name="a7593f4e30cde575c057d62ff1c47f1b3"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a7593f4e30cde575c057d62ff1c47f1b3">◆ </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">void sf::SoundStream::setEffectProcessor </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1SoundSource.html#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">override</span><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 from <a class="el" href="classsf_1_1SoundSource.html#a93f431c479da8b7774af4f393099ada4">sf::SoundSource</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a0c14b35d1dc64bf10e02b7a876540966" name="a0c14b35d1dc64bf10e02b7a876540966"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a0c14b35d1dc64bf10e02b7a876540966">◆ </a></span>setLooping()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::setLooping </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool</td> <td class="paramname"><span class="paramname"><em>loop</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set whether or not the stream should loop after reaching the end. </p>
|
|
<p>If set, the stream will restart from beginning after reaching the end and so on, until it is stopped or <code>setLooping(false)</code> is called. The default looping state for streams is <code>false</code>.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">loop</td><td><code>true</code> to play in loop, <code>false</code> to play once</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#a4f72aa9d4e185b4c02ffbb97075c7e82" title="Tell whether or not the stream is in loop mode.">isLooping</a></code> </dd></dl>
|
|
|
|
</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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#a471e2644f3599ac583bca92072ed3eec" title="Get the maximum distance of the sound.">getMaxDistance</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#a706eddad92fa4cf16b108b8942b72f26" title="Get the maximum gain of the sound.">getMaxGain</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the minimum distance of the sound. </p>
|
|
<p>The "minimum distance" of a sound is the maximum distance at which it is heard at its maximum volume. Further than the minimum distance, it will start to fade out according to its attenuation factor. A value of 0 ("inside the head
|
|
of the listener") is an invalid value and is forbidden. The default value of the minimum distance is 1.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">distance</td><td>New minimum distance of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a605ca7f359ec1c36fcccdcd4696562ac" title="Get the minimum distance of the sound.">getMinDistance</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the minimum 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="classsf_1_1SoundSource.html#a08a8b71fc60a4549db55add457209829" title="Get the minimum gain of the sound.">getMinGain</a></code>, <code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the pitch of the sound. </p>
|
|
<p>The pitch represents the perceived fundamental frequency of a sound; thus you can make a sound more acute or grave by changing its pitch. A side effect of changing the pitch is to modify the playing speed of the sound as well. The default value for the pitch is 1.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">pitch</td><td>New pitch to apply to the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a4736acc2c802f927544c9ce52a44a9e4" title="Get the pitch of the sound.">getPitch</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="af416a5f84c8750d2acb9821d78bc8646" name="af416a5f84c8750d2acb9821d78bc8646"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#af416a5f84c8750d2acb9821d78bc8646">◆ </a></span>setPlayingOffset()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::setPlayingOffset </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classsf_1_1Time.html">Time</a></td> <td class="paramname"><span class="paramname"><em>timeOffset</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Change the current playing position of the stream. </p>
|
|
<p>The playing position can be changed when the stream is either paused or playing. Changing the playing position when the stream is stopped has no effect, since playing the stream would reset its position.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">timeOffset</td><td>New playing position, from the beginning of the stream</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#ae288f3c72edbad9cc7ee938ce5b907c1" title="Get the current playing position of the stream.">getPlayingOffset</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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundSource::setPosition </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const <a class="el" href="namespacesf.html#aabc495912efba35400b484ea842664d0">Vector3f</a> &</td> <td class="paramname"><span class="paramname"><em>position</em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the 3D position of the sound in the audio scene. </p>
|
|
<p>Only sounds with one channel (mono sounds) can be spatialized. The default position of a sound is (0, 0, 0).</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">position</td><td>Position of the sound in the scene</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Make the sound's position relative to the listener or absolute. </p>
|
|
<p>Making a sound relative to the listener will ensure that it will always be played the same way regardless of the position of the listener. This can be useful for non-spatialized sounds, sounds that are produced by the listener, or sounds attached to it. The default value is <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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the 3D 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="classsf_1_1SoundSource.html#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="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<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>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">inherited</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Set the volume of the sound. </p>
|
|
<p>The volume is a value between 0 (mute) and 100 (full volume). The default value for the volume is 100.</p>
|
|
<dl class="params"><dt>Parameters</dt><dd>
|
|
<table class="params">
|
|
<tr><td class="paramname">volume</td><td>Volume of the sound</td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="classsf_1_1SoundSource.html#a04243fb5edf64561689b1d58953fc4ce" title="Get the volume of the sound.">getVolume</a></code> </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a id="a781fe51135fdc5679fe22a5665110143" name="a781fe51135fdc5679fe22a5665110143"></a>
|
|
<h2 class="memtitle"><span class="permalink"><a href="#a781fe51135fdc5679fe22a5665110143">◆ </a></span>stop()</h2>
|
|
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="mlabels">
|
|
<tr>
|
|
<td class="mlabels-left">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void sf::SoundStream::stop </td>
|
|
<td>(</td>
|
|
<td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
|
|
<td></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
<td class="mlabels-right">
|
|
<span class="mlabels"><span class="mlabel">override</span><span class="mlabel">virtual</span></span> </td>
|
|
</tr>
|
|
</table>
|
|
</div><div class="memdoc">
|
|
|
|
<p>Stop playing the audio stream. </p>
|
|
<p>This function stops the stream if it was playing or paused, and does nothing if it was already stopped. It also resets the playing position (unlike <code><a class="el" href="#a2285cedcbcb5f3c97828c664934dc0de" title="Pause the audio stream.">pause()</a></code>).</p>
|
|
<dl class="section see"><dt>See also</dt><dd><code><a class="el" href="#af05290eb2c6a316790fb18c5912a5dd6" title="Start or resume playing the audio stream.">play</a></code>, <code><a class="el" href="#a2285cedcbcb5f3c97828c664934dc0de" title="Pause the audio stream.">pause</a></code> </dd></dl>
|
|
|
|
<p>Implements <a class="el" href="classsf_1_1SoundSource.html#a06501a25b12376befcc7ee1ed4865fda">sf::SoundSource</a>.</p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="SoundStream_8hpp_source.html">SoundStream.hpp</a></li>
|
|
</ul>
|
|
</div><!-- contents -->
|
|
</div>
|
|
<div id="footer-container">
|
|
<div id="footer">
|
|
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br />
|
|
Copyright © Laurent Gomila ::
|
|
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> ::
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|