715 lines
49 KiB
HTML
715 lines
49 KiB
HTML
<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
|
|
<!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>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<title>irrKlang: irrklang::ISound Class Reference</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javaScript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body onload='searchBox.OnSelectItem(0);'>
|
|
<!-- Generated by Doxygen 1.6.1 -->
|
|
<script type="text/javascript"><!--
|
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
|
--></script>
|
|
<div class="navigation" id="top">
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</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">
|
|
<img id="MSearchSelect" src="search/search.png"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
alt=""/>
|
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="annotated.html"><span>Class List</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>
|
|
<div class="navpath"><a class="el" href="namespaceirrklang.html">irrklang</a>::<a class="el" href="classirrklang_1_1_i_sound.html">ISound</a>
|
|
</div>
|
|
</div>
|
|
<div class="contents">
|
|
<h1>irrklang::ISound Class Reference</h1><!-- doxytag: class="irrklang::ISound" --><!-- doxytag: inherits="irrklang::IVirtualRefCounted" -->
|
|
<p>Represents a sound which is currently played.
|
|
<a href="#_details">More...</a></p>
|
|
|
|
<p><code>#include <<a class="el" href="ik___i_sound_8h_source.html">ik_ISound.h</a>></code></p>
|
|
<div class="dynheader">
|
|
Inheritance diagram for irrklang::ISound:</div>
|
|
<div class="dynsection">
|
|
<div class="center">
|
|
<img src="classirrklang_1_1_i_sound.gif" usemap="#irrklang::ISound_map" alt=""/>
|
|
<map id="irrklang::ISound_map" name="irrklang::ISound_map">
|
|
<area href="classirrklang_1_1_i_virtual_ref_counted.html" alt="irrklang::IVirtualRefCounted" shape="rect" coords="0,0,167,24"/>
|
|
</map>
|
|
</div>
|
|
</div>
|
|
|
|
<p><a href="classirrklang_1_1_i_sound-members.html">List of all members.</a></p>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirrklang_1_1_i_sound_source.html">ISoundSource</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#ab48eb941e32834c0d77cfa252bd66e08">getSoundSource</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns source of the sound which stores the filename and other informations about that sound <a href="#ab48eb941e32834c0d77cfa252bd66e08"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a399fef60d1c48e2dffdf76d83173a15a">setIsPaused</a> (bool paused=true)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns if the sound is paused <a href="#a399fef60d1c48e2dffdf76d83173a15a"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#ade9a05d059ab8fd73973a1f2adc2af81">getIsPaused</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns if the sound is paused <a href="#ade9a05d059ab8fd73973a1f2adc2af81"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a108485fe64658441cecd70917782961f">stop</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Will stop the sound and free its resources. <a href="#a108485fe64658441cecd70917782961f"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a3c80c6f11978cccd2cee3883ed4a587a">getVolume</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns volume of the sound, a value between 0 (mute) and 1 (full volume). <a href="#a3c80c6f11978cccd2cee3883ed4a587a"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a4c91357775f1d15e2c276ced09a40599">setVolume</a> (<a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> volume)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sets the volume of the sound, a value between 0 (mute) and 1 (full volume). <a href="#a4c91357775f1d15e2c276ced09a40599"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#acce37a680cccecbaa3173b78df5e8531">setPan</a> (<a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> pan)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sets the pan of the sound. Takes a value between -1 and 1, 0 is center. <a href="#acce37a680cccecbaa3173b78df5e8531"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a344972a8120b9c562cba5ebf5039210d">getPan</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the pan of the sound. Takes a value between -1 and 1, 0 is center. <a href="#a344972a8120b9c562cba5ebf5039210d"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#ac012ae8299106d3e82d66f63d2378b9d">isLooped</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns if the sound has been started to play looped <a href="#ac012ae8299106d3e82d66f63d2378b9d"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#af564040ebfced7fcbe4e415ee47713c2">setIsLooped</a> (bool looped)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">changes the loop mode of the sound. <a href="#af564040ebfced7fcbe4e415ee47713c2"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a9d9e758f8500b194580de339c7f96768">isFinished</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns if the sound has finished playing. <a href="#a9d9e758f8500b194580de339c7f96768"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a318bcb0ec6c44078cdee3c9b080b6f41">setMinDistance</a> (<a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> min)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the minimal distance if this is a 3D sound. <a href="#a318bcb0ec6c44078cdee3c9b080b6f41"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a2da9631d826b0f662a3c635a8b9df6b4">getMinDistance</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the minimal distance if this is a 3D sound. <a href="#a2da9631d826b0f662a3c635a8b9df6b4"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a571f0117ef904ddf994a8638bd2b72ce">setMaxDistance</a> (<a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> max)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the maximal distance if this is a 3D sound. <a href="#a571f0117ef904ddf994a8638bd2b72ce"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a1ff40d382fc28c16fa36a88beb11b2fe">getMaxDistance</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the maximal distance if this is a 3D sound. <a href="#a1ff40d382fc28c16fa36a88beb11b2fe"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a994b98c059e8aee6adb82bb12d866338">setPosition</a> (<a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> position)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sets the position of the sound in 3d space <a href="#a994b98c059e8aee6adb82bb12d866338"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#af00d25ee00a4f83c5344421fd989762c">getPosition</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the position of the sound in 3d space <a href="#af00d25ee00a4f83c5344421fd989762c"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#aafa952978b4118141cb65304b5bdd1e2">setVelocity</a> (<a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> vel)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sets the position of the sound in 3d space, needed for Doppler effects. <a href="#aafa952978b4118141cb65304b5bdd1e2"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a685a2dddb5f5b08cd35546b1df6fad4b">getVelocity</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the velocity of the sound in 3d space, needed for Doppler effects. <a href="#a685a2dddb5f5b08cd35546b1df6fad4b"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#ad8edf019757e44c683b14424abc2275c">getPlayPosition</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the current play position of the sound in milliseconds. <a href="#ad8edf019757e44c683b14424abc2275c"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a60a6170484331189daadb541f62c5dc5">setPlayPosition</a> (<a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> pos)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">sets the current play position of the sound in milliseconds. <a href="#a60a6170484331189daadb541f62c5dc5"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#afdcf560325c0eefb6436d82fbc6cdb40">setPlaybackSpeed</a> (<a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> speed=1.0f)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the playback speed (frequency) of the sound. <a href="#afdcf560325c0eefb6436d82fbc6cdb40"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a7b8e88197b5d9daffb1af9a8b0116608">getPlaybackSpeed</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the playback speed set by <a class="el" href="classirrklang_1_1_i_sound.html#afdcf560325c0eefb6436d82fbc6cdb40" title="Sets the playback speed (frequency) of the sound.">setPlaybackSpeed()</a>. Default: 1.0f. <a href="#a7b8e88197b5d9daffb1af9a8b0116608"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a722403c1a7acff78a0278e7128a15ef0">getPlayLength</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">returns the play length of the sound in milliseconds. <a href="#a722403c1a7acff78a0278e7128a15ef0"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classirrklang_1_1_i_sound_effect_control.html">ISoundEffectControl</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a988bb2ccda459ad6aa3264e9a58aa99a">getSoundEffectControl</a> ()=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the sound effect control interface for this sound. <a href="#a988bb2ccda459ad6aa3264e9a58aa99a"></a><br/></td></tr>
|
|
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classirrklang_1_1_i_sound.html#a50dc71426d0abec7af56fa68a5bb87b5">setSoundStopEventReceiver</a> (<a class="el" href="classirrklang_1_1_i_sound_stop_event_receiver.html">ISoundStopEventReceiver</a> *reciever, void *userData=0)=0</td></tr>
|
|
<tr><td class="mdescLeft"> </td><td class="mdescRight">Sets the sound stop event receiver, an interface which gets called if a sound has finished playing. <a href="#a50dc71426d0abec7af56fa68a5bb87b5"></a><br/></td></tr>
|
|
</table>
|
|
<hr/><a name="_details"></a><h2>Detailed Description</h2>
|
|
<p>Represents a sound which is currently played. </p>
|
|
<p>The sound can be stopped, its volume or pan changed, effects added/removed and similar using this interface. Creating sounds is done using <a class="el" href="classirrklang_1_1_i_sound_engine.html#a25f612fe6479d3b22dc5bab2a2eaa927" title="loads a sound source (if not loaded already) from a file and plays it.">ISoundEngine::play2D()</a> or <a class="el" href="classirrklang_1_1_i_sound_engine.html#adb09ecc8f61120ce14d26545ed43d8ec" title="Loads a sound source (if not loaded already) from a file and plays it as 3D sound...">ISoundEngine::play3D()</a>. More informations about the source of a sound can be obtained from the <a class="el" href="classirrklang_1_1_i_sound_source.html" title="A sound source describes an input file (.ogg, .mp3, .wav or similar) and its default...">ISoundSource</a> interface. </p>
|
|
<hr/><h2>Member Function Documentation</h2>
|
|
<a class="anchor" id="ade9a05d059ab8fd73973a1f2adc2af81"></a><!-- doxytag: member="irrklang::ISound::getIsPaused" ref="ade9a05d059ab8fd73973a1f2adc2af81" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool irrklang::ISound::getIsPaused </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns if the sound is paused </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a1ff40d382fc28c16fa36a88beb11b2fe"></a><!-- doxytag: member="irrklang::ISound::getMaxDistance" ref="a1ff40d382fc28c16fa36a88beb11b2fe" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> irrklang::ISound::getMaxDistance </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the maximal distance if this is a 3D sound. </p>
|
|
<p>See <a class="el" href="classirrklang_1_1_i_sound.html#a571f0117ef904ddf994a8638bd2b72ce" title="Sets the maximal distance if this is a 3D sound.">setMaxDistance()</a> for details. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a2da9631d826b0f662a3c635a8b9df6b4"></a><!-- doxytag: member="irrklang::ISound::getMinDistance" ref="a2da9631d826b0f662a3c635a8b9df6b4" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> irrklang::ISound::getMinDistance </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the minimal distance if this is a 3D sound. </p>
|
|
<p>See <a class="el" href="classirrklang_1_1_i_sound.html#a318bcb0ec6c44078cdee3c9b080b6f41" title="Sets the minimal distance if this is a 3D sound.">setMinDistance()</a> for details. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a344972a8120b9c562cba5ebf5039210d"></a><!-- doxytag: member="irrklang::ISound::getPan" ref="a344972a8120b9c562cba5ebf5039210d" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> irrklang::ISound::getPan </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the pan of the sound. Takes a value between -1 and 1, 0 is center. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a7b8e88197b5d9daffb1af9a8b0116608"></a><!-- doxytag: member="irrklang::ISound::getPlaybackSpeed" ref="a7b8e88197b5d9daffb1af9a8b0116608" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> irrklang::ISound::getPlaybackSpeed </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the playback speed set by <a class="el" href="classirrklang_1_1_i_sound.html#afdcf560325c0eefb6436d82fbc6cdb40" title="Sets the playback speed (frequency) of the sound.">setPlaybackSpeed()</a>. Default: 1.0f. </p>
|
|
<p>See <a class="el" href="classirrklang_1_1_i_sound.html#afdcf560325c0eefb6436d82fbc6cdb40" title="Sets the playback speed (frequency) of the sound.">setPlaybackSpeed()</a> for details </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a722403c1a7acff78a0278e7128a15ef0"></a><!-- doxytag: member="irrklang::ISound::getPlayLength" ref="a722403c1a7acff78a0278e7128a15ef0" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> irrklang::ISound::getPlayLength </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the play length of the sound in milliseconds. </p>
|
|
<p>Returns -1 if not known for this sound for example because its decoder does not support length reporting or it is a file stream of unknown size. Note: You can also use <a class="el" href="classirrklang_1_1_i_sound_source.html#a23ff097b74d284529e4e1c75d0611884" title="Returns the play length of the sound in milliseconds.">ISoundSource::getPlayLength()</a> to get the length of a sound without actually needing to play it. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ad8edf019757e44c683b14424abc2275c"></a><!-- doxytag: member="irrklang::ISound::getPlayPosition" ref="ad8edf019757e44c683b14424abc2275c" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> irrklang::ISound::getPlayPosition </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the current play position of the sound in milliseconds. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns -1 if not implemented or possible for this sound for example because it already has been stopped and freed internally or similar. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af00d25ee00a4f83c5344421fd989762c"></a><!-- doxytag: member="irrklang::ISound::getPosition" ref="af00d25ee00a4f83c5344421fd989762c" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> irrklang::ISound::getPosition </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the position of the sound in 3d space </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a988bb2ccda459ad6aa3264e9a58aa99a"></a><!-- doxytag: member="irrklang::ISound::getSoundEffectControl" ref="a988bb2ccda459ad6aa3264e9a58aa99a" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="classirrklang_1_1_i_sound_effect_control.html">ISoundEffectControl</a>* irrklang::ISound::getSoundEffectControl </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Returns the sound effect control interface for this sound. </p>
|
|
<p>Sound effects such as Chorus, Distorsions, Echo, Reverb and similar can be controlled using this. The interface pointer is only valid as long as the <a class="el" href="classirrklang_1_1_i_sound.html" title="Represents a sound which is currently played.">ISound</a> pointer is valid. If the <a class="el" href="classirrklang_1_1_i_sound.html" title="Represents a sound which is currently played.">ISound</a> pointer gets dropped (<a class="el" href="classirrklang_1_1_i_virtual_ref_counted.html#a6602c3d110f23410c5bca8a08b709aa4" title="Drops the object. Decrements the reference counter by one.">IVirtualRefCounted::drop()</a>), the ISoundEffects may not be used any more. </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns a pointer to the sound effects interface if available. The sound has to be started via <a class="el" href="classirrklang_1_1_i_sound_engine.html#a25f612fe6479d3b22dc5bab2a2eaa927" title="loads a sound source (if not loaded already) from a file and plays it.">ISoundEngine::play2D()</a> or <a class="el" href="classirrklang_1_1_i_sound_engine.html#adb09ecc8f61120ce14d26545ed43d8ec" title="Loads a sound source (if not loaded already) from a file and plays it as 3D sound...">ISoundEngine::play3D()</a>, with the flag enableSoundEffects=true, otherwise 0 will be returned. Note that if the output driver does not support sound effects, 0 will be returned as well. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ab48eb941e32834c0d77cfa252bd66e08"></a><!-- doxytag: member="irrklang::ISound::getSoundSource" ref="ab48eb941e32834c0d77cfa252bd66e08" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="classirrklang_1_1_i_sound_source.html">ISoundSource</a>* irrklang::ISound::getSoundSource </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns source of the sound which stores the filename and other informations about that sound </p>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns the sound source poitner of this sound. May return 0 if the sound source has been removed. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a685a2dddb5f5b08cd35546b1df6fad4b"></a><!-- doxytag: member="irrklang::ISound::getVelocity" ref="a685a2dddb5f5b08cd35546b1df6fad4b" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> irrklang::ISound::getVelocity </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns the velocity of the sound in 3d space, needed for Doppler effects. </p>
|
|
<p>To use doppler effects use <a class="el" href="classirrklang_1_1_i_sound.html#aafa952978b4118141cb65304b5bdd1e2" title="sets the position of the sound in 3d space, needed for Doppler effects.">ISound::setVelocity</a> to set a sounds velocity, <a class="el" href="classirrklang_1_1_i_sound_engine.html#af3e6223435969159ef3b22d0c83d2b84" title="Sets the current listener 3d position.">ISoundEngine::setListenerPosition()</a> to set the listeners velocity and <a class="el" href="classirrklang_1_1_i_sound_engine.html#a088de9bd74ae6bd58d865a38ae2411f3" title="Sets parameters affecting the doppler effect.">ISoundEngine::setDopplerEffectParameters()</a> to adjust two parameters influencing the doppler effects intensity. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a3c80c6f11978cccd2cee3883ed4a587a"></a><!-- doxytag: member="irrklang::ISound::getVolume" ref="a3c80c6f11978cccd2cee3883ed4a587a" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual <a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> irrklang::ISound::getVolume </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns volume of the sound, a value between 0 (mute) and 1 (full volume). </p>
|
|
<p>(this volume gets multiplied with the master volume of the sound engine and other parameters like distance to listener when played as 3d sound) </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a9d9e758f8500b194580de339c7f96768"></a><!-- doxytag: member="irrklang::ISound::isFinished" ref="a9d9e758f8500b194580de339c7f96768" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool irrklang::ISound::isFinished </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns if the sound has finished playing. </p>
|
|
<p>Don't mix this up with isPaused(). <a class="el" href="classirrklang_1_1_i_sound.html#a9d9e758f8500b194580de339c7f96768" title="returns if the sound has finished playing.">isFinished()</a> returns if the sound has been finished playing. If it has, is maybe already have been removed from the playing list of the sound engine and calls to any other of the methods of <a class="el" href="classirrklang_1_1_i_sound.html" title="Represents a sound which is currently played.">ISound</a> will not have any result. If you call <a class="el" href="classirrklang_1_1_i_sound.html#a108485fe64658441cecd70917782961f" title="Will stop the sound and free its resources.">stop()</a> to a playing sound will result that this function will return true when invoked. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="ac012ae8299106d3e82d66f63d2378b9d"></a><!-- doxytag: member="irrklang::ISound::isLooped" ref="ac012ae8299106d3e82d66f63d2378b9d" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool irrklang::ISound::isLooped </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns if the sound has been started to play looped </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="af564040ebfced7fcbe4e415ee47713c2"></a><!-- doxytag: member="irrklang::ISound::setIsLooped" ref="af564040ebfced7fcbe4e415ee47713c2" args="(bool looped)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setIsLooped </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"> <em>looped</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>changes the loop mode of the sound. </p>
|
|
<p>If the sound is playing looped and it is changed to not-looped, then it will stop playing after the loop has finished. If it is not looped and changed to looped, the sound will start repeating to be played when it reaches its end. Invoking this method will not have an effect when the sound already has stopped. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a399fef60d1c48e2dffdf76d83173a15a"></a><!-- doxytag: member="irrklang::ISound::setIsPaused" ref="a399fef60d1c48e2dffdf76d83173a15a" args="(bool paused=true)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setIsPaused </td>
|
|
<td>(</td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"> <em>paused</em> = <code>true</code></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>returns if the sound is paused </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a571f0117ef904ddf994a8638bd2b72ce"></a><!-- doxytag: member="irrklang::ISound::setMaxDistance" ref="a571f0117ef904ddf994a8638bd2b72ce" args="(ik_f32 max)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setMaxDistance </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td>
|
|
<td class="paramname"> <em>max</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the maximal distance if this is a 3D sound. </p>
|
|
<p>Changing this value is usually not necessary. Use <a class="el" href="classirrklang_1_1_i_sound.html#a318bcb0ec6c44078cdee3c9b080b6f41" title="Sets the minimal distance if this is a 3D sound.">setMinDistance()</a> instead. Don't change this value if you don't know what you are doing: This value causes the sound to stop attenuating after it reaches the max distance. Most people think that this sets the volume of the sound to 0 after this distance, but this is not true. Only change the minimal distance (using for example <a class="el" href="classirrklang_1_1_i_sound.html#a318bcb0ec6c44078cdee3c9b080b6f41" title="Sets the minimal distance if this is a 3D sound.">setMinDistance()</a>) to influence this. The maximum distance for a sound source is the distance beyond which the sound does not get any quieter. The default minimum distance is 1, the default max distance is a huge number like 1000000000.0f. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a318bcb0ec6c44078cdee3c9b080b6f41"></a><!-- doxytag: member="irrklang::ISound::setMinDistance" ref="a318bcb0ec6c44078cdee3c9b080b6f41" args="(ik_f32 min)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setMinDistance </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td>
|
|
<td class="paramname"> <em>min</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the minimal distance if this is a 3D sound. </p>
|
|
<p>Changes the distance at which the 3D sound stops getting louder. This works like this: As a listener approaches a 3D sound source, the sound gets louder. Past a certain point, it is not reasonable for the volume to continue to increase. Either the maximum (zero) has been reached, or the nature of the sound source imposes a logical limit. This is the minimum distance for the sound source. Similarly, the maximum distance for a sound source is the distance beyond which the sound does not get any quieter. The default minimum distance is 1, the default max distance is a huge number like 1000000000.0f. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="acce37a680cccecbaa3173b78df5e8531"></a><!-- doxytag: member="irrklang::ISound::setPan" ref="acce37a680cccecbaa3173b78df5e8531" args="(ik_f32 pan)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setPan </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td>
|
|
<td class="paramname"> <em>pan</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>sets the pan of the sound. Takes a value between -1 and 1, 0 is center. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="afdcf560325c0eefb6436d82fbc6cdb40"></a><!-- doxytag: member="irrklang::ISound::setPlaybackSpeed" ref="afdcf560325c0eefb6436d82fbc6cdb40" args="(ik_f32 speed=1.0f)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool irrklang::ISound::setPlaybackSpeed </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td>
|
|
<td class="paramname"> <em>speed</em> = <code>1.0f</code></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the playback speed (frequency) of the sound. </p>
|
|
<p>Plays the sound at a higher or lower speed, increasing or decreasing its frequency which makes it sound lower or higher. Note that this feature is not available on all sound output drivers (it is on the DirectSound drivers at least), and it does not work together with the 'enableSoundEffects' parameter of <a class="el" href="classirrklang_1_1_i_sound_engine.html#a25f612fe6479d3b22dc5bab2a2eaa927" title="loads a sound source (if not loaded already) from a file and plays it.">ISoundEngine::play2D</a> and <a class="el" href="classirrklang_1_1_i_sound_engine.html#adb09ecc8f61120ce14d26545ed43d8ec" title="Loads a sound source (if not loaded already) from a file and plays it as 3D sound...">ISoundEngine::play3D</a> when using DirectSound. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>speed</em> </td><td>Factor of the speed increase or decrease. 2 is twice as fast, 0.5 is only half as fast. The default is 1.0. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns true if sucessful, false if not. The current sound driver might not support changing the playBack speed, or the sound was started with the 'enableSoundEffects' parameter. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a60a6170484331189daadb541f62c5dc5"></a><!-- doxytag: member="irrklang::ISound::setPlayPosition" ref="a60a6170484331189daadb541f62c5dc5" args="(ik_u32 pos)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual bool irrklang::ISound::setPlayPosition </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0">ik_u32</a> </td>
|
|
<td class="paramname"> <em>pos</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>sets the current play position of the sound in milliseconds. </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>pos</em> </td><td>Position in milliseconds. Must be between 0 and the value returned by <a class="el" href="classirrklang_1_1_i_sound.html#ad8edf019757e44c683b14424abc2275c" title="returns the current play position of the sound in milliseconds.">getPlayPosition()</a>. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
<dl class="return"><dt><b>Returns:</b></dt><dd>Returns true successful. False is returned for example if the sound already finished playing and is stopped or the audio source is not seekable, for example if it is an internet stream or a a file format not supporting seeking (a .MOD file for example). A file can be tested if it can bee seeking using <a class="el" href="classirrklang_1_1_i_sound_source.html#a6a608ded51f5920d0cb5d28ac6ee5455" title="Returns if sounds played from this source will support seeking via ISound::setPlayPosition()...">ISoundSource::getIsSeekingSupported()</a>. </dd></dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a994b98c059e8aee6adb82bb12d866338"></a><!-- doxytag: member="irrklang::ISound::setPosition" ref="a994b98c059e8aee6adb82bb12d866338" args="(vec3df position)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setPosition </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> </td>
|
|
<td class="paramname"> <em>position</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>sets the position of the sound in 3d space </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a50dc71426d0abec7af56fa68a5bb87b5"></a><!-- doxytag: member="irrklang::ISound::setSoundStopEventReceiver" ref="a50dc71426d0abec7af56fa68a5bb87b5" args="(ISoundStopEventReceiver *reciever, void *userData=0)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setSoundStopEventReceiver </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classirrklang_1_1_i_sound_stop_event_receiver.html">ISoundStopEventReceiver</a> * </td>
|
|
<td class="paramname"> <em>reciever</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">void * </td>
|
|
<td class="paramname"> <em>userData</em> = <code>0</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Sets the sound stop event receiver, an interface which gets called if a sound has finished playing. </p>
|
|
<p>This event is guaranteed to be called when the sound or sound stream is finished, either because the sound reached its playback end, its sound source was removed, <a class="el" href="classirrklang_1_1_i_sound_engine.html#a38dbc2f1d49e3127fc4a81a9c1a2f82d" title="Stops all currently playing sounds.">ISoundEngine::stopAllSounds()</a> has been called or the whole engine was deleted. There is an example on how to use events in <a class="el" href="namespaceirrklang.html" title="Everything in the irrKlang Sound Engine can be found in this namespace.">irrklang</a> at <a class="el" href="index.html#events">Using Sound Events</a> . </p>
|
|
<dl><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>receiver</em> </td><td>Interface to a user implementation of the sound receiver. This interface should be as long valid as the sound exists or another stop event receiver is set. Set this to null to set no sound stop event receiver. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>userData,:</em> </td><td>A iser data pointer, can be null. </td></tr>
|
|
</table>
|
|
</dd>
|
|
</dl>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="aafa952978b4118141cb65304b5bdd1e2"></a><!-- doxytag: member="irrklang::ISound::setVelocity" ref="aafa952978b4118141cb65304b5bdd1e2" args="(vec3df vel)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setVelocity </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="classirrklang_1_1vec3d.html">vec3df</a> </td>
|
|
<td class="paramname"> <em>vel</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>sets the position of the sound in 3d space, needed for Doppler effects. </p>
|
|
<p>To use doppler effects use <a class="el" href="classirrklang_1_1_i_sound.html#aafa952978b4118141cb65304b5bdd1e2" title="sets the position of the sound in 3d space, needed for Doppler effects.">ISound::setVelocity</a> to set a sounds velocity, <a class="el" href="classirrklang_1_1_i_sound_engine.html#af3e6223435969159ef3b22d0c83d2b84" title="Sets the current listener 3d position.">ISoundEngine::setListenerPosition()</a> to set the listeners velocity and <a class="el" href="classirrklang_1_1_i_sound_engine.html#a088de9bd74ae6bd58d865a38ae2411f3" title="Sets parameters affecting the doppler effect.">ISoundEngine::setDopplerEffectParameters()</a> to adjust two parameters influencing the doppler effects intensity. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a4c91357775f1d15e2c276ced09a40599"></a><!-- doxytag: member="irrklang::ISound::setVolume" ref="a4c91357775f1d15e2c276ced09a40599" args="(ik_f32 volume)=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::setVolume </td>
|
|
<td>(</td>
|
|
<td class="paramtype"><a class="el" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f">ik_f32</a> </td>
|
|
<td class="paramname"> <em>volume</em></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>sets the volume of the sound, a value between 0 (mute) and 1 (full volume). </p>
|
|
<p>This volume gets multiplied with the master volume of the sound engine and other parameters like distance to listener when played as 3d sound. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<a class="anchor" id="a108485fe64658441cecd70917782961f"></a><!-- doxytag: member="irrklang::ISound::stop" ref="a108485fe64658441cecd70917782961f" args="()=0" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">virtual void irrklang::ISound::stop </td>
|
|
<td>(</td>
|
|
<td class="paramname"></td>
|
|
<td> ) </td>
|
|
<td><code> [pure virtual]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>Will stop the sound and free its resources. </p>
|
|
<p>If you just want to pause the sound, use <a class="el" href="classirrklang_1_1_i_sound.html#a399fef60d1c48e2dffdf76d83173a15a" title="returns if the sound is paused">setIsPaused()</a>. After calling <a class="el" href="classirrklang_1_1_i_sound.html#a108485fe64658441cecd70917782961f" title="Will stop the sound and free its resources.">stop()</a>, <a class="el" href="classirrklang_1_1_i_sound.html#a9d9e758f8500b194580de339c7f96768" title="returns if the sound has finished playing.">isFinished()</a> will usually return true. Be sure to also call -><a class="el" href="classirrklang_1_1_i_virtual_ref_counted.html#a6602c3d110f23410c5bca8a08b709aa4" title="Drops the object. Decrements the reference counter by one.">drop()</a> once you are done. </p>
|
|
|
|
</div>
|
|
</div>
|
|
<hr/>The documentation for this class was generated from the following file:<ul>
|
|
<li><a class="el" href="ik___i_sound_8h_source.html">ik_ISound.h</a></li>
|
|
</ul>
|
|
</div>
|
|
<!--- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Defines</a></div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<hr size="1">
|
|
<address style="align: right;">
|
|
<small> </small>
|
|
</address>
|
|
<table width="100%" border="0" cellspacing="0" cellpadding="2">
|
|
<tr>
|
|
<td width="0"> <div align="left"><small><a href="http://www.ambiera.com/irrklang" target="_blank"><img src="irrklang.png" alt="irrKlang Audio Library" align="middle" border=0 width=88 height=30></a></small></div></td>
|
|
<td> <div align="left"><small><em><font size="2">The <a href="http://www.ambiera.com/irrklang" target="_blank">irrKlang
|
|
Engine</a> Documentation © 2003-2018 by Nikolaus Gebhardt. Generated
|
|
by <a href="http://www.doxygen.org" target="_blank">Doxygen</a>
|
|
(1.6.1)</font></em></small></div></td>
|
|
</tr>
|
|
</table>
|
|
<address style="align: right;">
|
|
</address>
|
|
</body>
|
|
</html>
|