HumanRender/Thirdparty/irrKlang/doc/cpp/ik___i_sound_8h_source.html

175 lines
18 KiB
HTML
Raw Normal View History

2024-12-19 17:46:41 +00:00
<!-- 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: ik_ISound.h Source File</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&nbsp;Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><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="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<h1>ik_ISound.h</h1><a href="ik___i_sound_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2018 Nikolaus Gebhardt</span>
<a name="l00002"></a>00002 <span class="comment">// This file is part of the &quot;irrKlang&quot; library.</span>
<a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrKlang.h</span>
<a name="l00004"></a>00004
<a name="l00005"></a>00005 <span class="preprocessor">#ifndef __I_IRRKLANG_SOUND_H_INCLUDED__</span>
<a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __I_IRRKLANG_SOUND_H_INCLUDED__</span>
<a name="l00007"></a>00007 <span class="preprocessor"></span>
<a name="l00008"></a>00008 <span class="preprocessor">#include &quot;<a class="code" href="ik___i_virtual_ref_counted_8h.html">ik_IVirtualRefCounted.h</a>&quot;</span>
<a name="l00009"></a>00009 <span class="preprocessor">#include &quot;<a class="code" href="ik___i_sound_effect_control_8h.html">ik_ISoundEffectControl.h</a>&quot;</span>
<a name="l00010"></a>00010 <span class="preprocessor">#include &quot;<a class="code" href="ik__vec3d_8h.html">ik_vec3d.h</a>&quot;</span>
<a name="l00011"></a>00011
<a name="l00012"></a>00012
<a name="l00013"></a>00013 <span class="keyword">namespace </span>irrklang
<a name="l00014"></a>00014 {
<a name="l00015"></a>00015 <span class="keyword">class </span>ISoundSource;
<a name="l00016"></a>00016 <span class="keyword">class </span>ISoundStopEventReceiver;
<a name="l00017"></a>00017
<a name="l00019"></a>00019
<a name="l00024"></a><a class="code" href="classirrklang_1_1_i_sound.html">00024</a> <span class="keyword">class </span><a class="code" href="classirrklang_1_1_i_sound.html" title="Represents a sound which is currently played.">ISound</a> : <span class="keyword">public</span> <a class="code" href="classirrklang_1_1_i_virtual_ref_counted.html" title="Reference counting base class for objects in the Irrlicht Engine similar to IRefCounted...">IVirtualRefCounted</a>
<a name="l00025"></a>00025 {
<a name="l00026"></a>00026 <span class="keyword">public</span>:
<a name="l00027"></a>00027
<a name="l00029"></a>00029
<a name="l00031"></a>00031 <span class="keyword">virtual</span> <a class="code" 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>* <a class="code" href="classirrklang_1_1_i_sound.html#ab48eb941e32834c0d77cfa252bd66e08" title="returns source of the sound which stores the filename and other informations about...">getSoundSource</a>() = 0;
<a name="l00032"></a>00032
<a name="l00034"></a>00034 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a399fef60d1c48e2dffdf76d83173a15a" title="returns if the sound is paused">setIsPaused</a>( <span class="keywordtype">bool</span> paused = <span class="keyword">true</span>) = 0;
<a name="l00035"></a>00035
<a name="l00037"></a>00037 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirrklang_1_1_i_sound.html#ade9a05d059ab8fd73973a1f2adc2af81" title="returns if the sound is paused">getIsPaused</a>() = 0;
<a name="l00038"></a>00038
<a name="l00040"></a>00040
<a name="l00043"></a>00043 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a108485fe64658441cecd70917782961f" title="Will stop the sound and free its resources.">stop</a>() = 0;
<a name="l00044"></a>00044
<a name="l00046"></a>00046
<a name="l00048"></a>00048 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a3c80c6f11978cccd2cee3883ed4a587a" title="returns volume of the sound, a value between 0 (mute) and 1 (full volume).">getVolume</a>() = 0;
<a name="l00049"></a>00049
<a name="l00051"></a>00051
<a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a4c91357775f1d15e2c276ced09a40599" title="sets the volume of the sound, a value between 0 (mute) and 1 (full volume).">setVolume</a>(<a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> volume) = 0;
<a name="l00054"></a>00054
<a name="l00056"></a>00056 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#acce37a680cccecbaa3173b78df5e8531" title="sets the pan of the sound. Takes a value between -1 and 1, 0 is center.">setPan</a>(<a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> pan) = 0;
<a name="l00057"></a>00057
<a name="l00059"></a>00059 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a344972a8120b9c562cba5ebf5039210d" title="returns the pan of the sound. Takes a value between -1 and 1, 0 is center.">getPan</a>() = 0;
<a name="l00060"></a>00060
<a name="l00062"></a>00062 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirrklang_1_1_i_sound.html#ac012ae8299106d3e82d66f63d2378b9d" title="returns if the sound has been started to play looped">isLooped</a>() = 0;
<a name="l00063"></a>00063
<a name="l00065"></a>00065
<a name="l00070"></a>00070 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#af564040ebfced7fcbe4e415ee47713c2" title="changes the loop mode of the sound.">setIsLooped</a>(<span class="keywordtype">bool</span> looped) = 0;
<a name="l00071"></a>00071
<a name="l00073"></a>00073
<a name="l00078"></a>00078 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirrklang_1_1_i_sound.html#a9d9e758f8500b194580de339c7f96768" title="returns if the sound has finished playing.">isFinished</a>() = 0;
<a name="l00079"></a>00079
<a name="l00081"></a>00081
<a name="l00089"></a>00089 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a318bcb0ec6c44078cdee3c9b080b6f41" title="Sets the minimal distance if this is a 3D sound.">setMinDistance</a>(<a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> min) = 0;
<a name="l00090"></a>00090
<a name="l00092"></a>00092
<a name="l00093"></a>00093 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a2da9631d826b0f662a3c635a8b9df6b4" title="Returns the minimal distance if this is a 3D sound.">getMinDistance</a>() = 0;
<a name="l00094"></a>00094
<a name="l00096"></a>00096
<a name="l00103"></a>00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a571f0117ef904ddf994a8638bd2b72ce" title="Sets the maximal distance if this is a 3D sound.">setMaxDistance</a>(<a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> max) = 0;
<a name="l00104"></a>00104
<a name="l00106"></a>00106
<a name="l00107"></a>00107 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a1ff40d382fc28c16fa36a88beb11b2fe" title="Returns the maximal distance if this is a 3D sound.">getMaxDistance</a>() = 0;
<a name="l00108"></a>00108
<a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a994b98c059e8aee6adb82bb12d866338" title="sets the position of the sound in 3d space">setPosition</a>(<a class="code" href="classirrklang_1_1vec3d.html" title="a 3d vector template class for representing vectors and points in 3d">vec3df</a> position) = 0;
<a name="l00111"></a>00111
<a name="l00113"></a>00113 <span class="keyword">virtual</span> <a class="code" href="classirrklang_1_1vec3d.html" title="a 3d vector template class for representing vectors and points in 3d">vec3df</a> <a class="code" href="classirrklang_1_1_i_sound.html#af00d25ee00a4f83c5344421fd989762c" title="returns the position of the sound in 3d space">getPosition</a>() = 0;
<a name="l00114"></a>00114
<a name="l00116"></a>00116
<a name="l00120"></a>00120 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#aafa952978b4118141cb65304b5bdd1e2" title="sets the position of the sound in 3d space, needed for Doppler effects.">setVelocity</a>(<a class="code" href="classirrklang_1_1vec3d.html" title="a 3d vector template class for representing vectors and points in 3d">vec3df</a> vel) = 0;
<a name="l00121"></a>00121
<a name="l00123"></a>00123
<a name="l00127"></a>00127 <span class="keyword">virtual</span> <a class="code" href="classirrklang_1_1vec3d.html" title="a 3d vector template class for representing vectors and points in 3d">vec3df</a> <a class="code" href="classirrklang_1_1_i_sound.html#a685a2dddb5f5b08cd35546b1df6fad4b" title="returns the velocity of the sound in 3d space, needed for Doppler effects.">getVelocity</a>() = 0;
<a name="l00128"></a>00128
<a name="l00130"></a>00130
<a name="l00132"></a>00132 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0" title="32 bit unsigned variable.">ik_u32</a> <a class="code" href="classirrklang_1_1_i_sound.html#ad8edf019757e44c683b14424abc2275c" title="returns the current play position of the sound in milliseconds.">getPlayPosition</a>() = 0;
<a name="l00133"></a>00133
<a name="l00135"></a>00135
<a name="l00141"></a>00141 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirrklang_1_1_i_sound.html#a60a6170484331189daadb541f62c5dc5" title="sets the current play position of the sound in milliseconds.">setPlayPosition</a>(<a class="code" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0" title="32 bit unsigned variable.">ik_u32</a> pos) = 0;
<a name="l00142"></a>00142
<a name="l00144"></a>00144
<a name="l00155"></a>00155 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirrklang_1_1_i_sound.html#afdcf560325c0eefb6436d82fbc6cdb40" title="Sets the playback speed (frequency) of the sound.">setPlaybackSpeed</a>(<a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> speed = 1.0f) = 0;
<a name="l00156"></a>00156
<a name="l00158"></a>00158
<a name="l00159"></a>00159 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#a6fa5a4dd85b476308461136072ef4e0f" title="32 bit floating point variable.">ik_f32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a7b8e88197b5d9daffb1af9a8b0116608" title="Returns the playback speed set by setPlaybackSpeed(). Default: 1.0f.">getPlaybackSpeed</a>() = 0;
<a name="l00160"></a>00160
<a name="l00162"></a>00162
<a name="l00166"></a>00166 <span class="keyword">virtual</span> <a class="code" href="namespaceirrklang.html#adf9f75b6ca98aff6843fb294125571e0" title="32 bit unsigned variable.">ik_u32</a> <a class="code" href="classirrklang_1_1_i_sound.html#a722403c1a7acff78a0278e7128a15ef0" title="returns the play length of the sound in milliseconds.">getPlayLength</a>() = 0;
<a name="l00167"></a>00167
<a name="l00169"></a>00169
<a name="l00177"></a>00177 <span class="keyword">virtual</span> <a class="code" href="classirrklang_1_1_i_sound_effect_control.html" title="Interface to control the active sound effects (echo, reverb,...) of an ISound object...">ISoundEffectControl</a>* <a class="code" href="classirrklang_1_1_i_sound.html#a988bb2ccda459ad6aa3264e9a58aa99a" title="Returns the sound effect control interface for this sound.">getSoundEffectControl</a>() = 0;
<a name="l00178"></a>00178
<a name="l00180"></a>00180
<a name="l00188"></a>00188 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirrklang_1_1_i_sound.html#a50dc71426d0abec7af56fa68a5bb87b5" title="Sets the sound stop event receiver, an interface which gets called if a sound has...">setSoundStopEventReceiver</a>(<a class="code" href="classirrklang_1_1_i_sound_stop_event_receiver.html" title="Interface to be implemented by the user, which recieves sound stop events.">ISoundStopEventReceiver</a>* reciever, <span class="keywordtype">void</span>* userData=0) = 0;
<a name="l00189"></a>00189 };
<a name="l00190"></a>00190
<a name="l00191"></a>00191 } <span class="comment">// end namespace irrklang</span>
<a name="l00192"></a>00192
<a name="l00193"></a>00193
<a name="l00194"></a>00194 <span class="preprocessor">#endif</span>
</pre></div></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">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</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 &copy; 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>