mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 18:18:18 +00:00
53 lines
17 KiB
HTML
53 lines
17 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||
|
|
||
|
<html><head><title>Sound</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
|
||
|
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
|
||
|
|
||
|
<!-- Generated by Natural Docs, version 1.4 -->
|
||
|
<!-- http://www.naturaldocs.org -->
|
||
|
|
||
|
<!-- saved from url=(0026)http://www.naturaldocs.org -->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=Content><div class="CSection"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="Sound"></a>Sound</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#Sound" >Sound</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snd_set_channel" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">snd_set_channel</a></td><td class=SDescription>Sets the parameters for a sound channel.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#snd_load_wv" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">snd_load_wv</a></td><td class=SDescription>Loads a wavpack compressed sound.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snd_play_at" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">snd_play_at</a></td><td class=SDescription>Plays a sound at a specified postition.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#snd_play" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">snd_play</a></td><td class=SDescription>Plays a sound.</td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#snd_stop" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">snd_stop</a></td><td class=SDescription>Stops a currenly playing sound.</td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#snd_set_listener_pos" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">snd_set_listener_pos</a></td><td class=SDescription>Sets the listener posititon.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
|
||
|
|
||
|
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_set_channel"></a>snd_set_channel</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_set_channel(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>vol,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>pan</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the parameters for a sound channel.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cid</td><td class=CDLDescription>Channel ID</td></tr><tr><td class=CDLEntry>vol</td><td class=CDLDescription>Volume for the channel. 0.0 to 1.0.</td></tr><tr><td class=CDLEntry>pan</td><td class=CDLDescription>Panning for the channel. -1.0 is all left. 0.0 is equal distribution. 1.0 is all right.</td></tr></table></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_load_wv"></a>snd_load_wv</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_load_wv(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Loads a wavpack compressed sound.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>filename</td><td class=CDLDescription>Filename of the file to load</td></tr></table><h4 class=CHeading>Returns</h4><p>The id of the loaded sound. -1 on failure.</p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_play_at"></a>snd_play_at</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_play_at(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>sid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>flags,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Plays a sound at a specified postition.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cid</td><td class=CDLDescription>Channel id of the channel to use.</td></tr><tr><td class=CDLEntry>sid</td><td class=CDLDescription>Sound id of the sound to play.</td></tr><tr><td class=CDLEntry>flags</td><td class=CDLDescription>TODO</td></tr><tr><td class=CDLEntry>x</td><td class=CDLDescription>TODO</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>TODO</td></tr></table><h4 class=CHeading>Returns</h4><p>An id to the voice. -1 on failure.</p><h4 class=CHeading>See Also</h4><p><snd_play, snd_stop></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_play"></a>snd_play</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_play(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>sid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>flags</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Plays a sound.</p><h4 class=CHeading>Arguments</h4><p>Arguments: cid - Channel id of the channel to use. sid - Sound id of the sound to play. flags - TODO</p><h4 class=CHeading>Returns</h4><p>An id to the voice. -1 on failure.</p><h4 class=CHeading>See Also</h4><p><snd_play_at, snd_stop></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_stop"></a>snd_stop</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_stop(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Stops a currenly playing sound.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>id</td><td class=CDLDescription>The ID of the voice to stop.</td></tr></table><h4 class=CHeading>See Also</h4><p><snd_play, snd_play_at></p></div></div></div>
|
||
|
|
||
|
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="snd_set_listener_pos"></a>snd_set_listener_pos</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_set_listener_pos(</td><td class=PType nowrap>float </td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the listener posititon.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>x</td><td class=CDLDescription>TODO</td></tr><tr><td class=CDLEntry>y</td><td class=CDLDescription>TODO</td></tr></table></div></div></div>
|
||
|
|
||
|
</div><!--Content-->
|
||
|
|
||
|
|
||
|
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
|
||
|
|
||
|
|
||
|
<div id=Menu><div class=MEntry><div class=MFile><a href="e_system-h.html">OS Abstraction</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent6')">Engine</a><div class=MGroupContent id=MGroupContent6><div class=MEntry><div class=MFile><a href="e_if_msg-h.html">Messaging</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Client</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Overview</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="docs/client_time-txt.html">Time on the client</a></div></div><div class=MEntry><div class=MFile><a href="docs/prediction-txt.html">Prediction</a></div></div><div class=MEntry><div class=MFile><a href="docs/snapshots-txt.html">Snapshots</a></div></div><div class=MEntry><div class=MFile><a href="docs/server_op-txt.html">Server Operation</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Reference</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="e_if_modc-h.html">Client Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_client-h.html">Client Interface</a></div></div><div class=MEntry><div class=MFile><a href="e_if_other-h.html">Engine Interface</a></div></div><div class=MEntry><div class=MFile><a href="e_if_gfx-h.html">Graphics</a></div></div><div class=MEntry><div class=MFile><a href="e_if_inp-h.html">Input</a></div></div><div class=MEntry><div class=MFile id=MSelected>Sound</div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent5')">Server</a><div class=MGroupContent id=MGroupContent5><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent4')">Reference</a><div class=MGroupContent id=MGroupContent4><div class=MEntry><div class=MFile><a href="e_if_mods-h.html">Server Hooks</a></div></div><div class=MEntry><div class=MFile><a href="e_if_server-h.html">Server Interface</a></div></div></div></div></div></div></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent7')">Game</a><div class=MGroupContent id=MGroupContent7><div class=MEntry><div class=MFile><a href="../files/server/gs_common-hpp.html">Entity</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent8')">Index</a><div class=MGroupContent id=MGroupContent8><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Constants.html">Constants</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Variables.html">Variables</a></div></div></div></div></div><script type="text/javascript"><!--
|
||
|
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
|
||
|
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Constants">Constants</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
|
||
|
HideAllBut([2, 3, 6, 1], 9);// --></script></div><!--Menu-->
|
||
|
|
||
|
|
||
|
|
||
|
<!--START_ND_TOOLTIPS-->
|
||
|
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_set_channel(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>vol,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>pan</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the parameters for a sound channel.</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_load_wv(</td><td class=PTypePrefix nowrap>const </td><td class=PType nowrap>char </td><td class=PParameterPrefix nowrap>*</td><td class=PParameter nowrap>filename</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Loads a wavpack compressed sound.</div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_play_at(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>sid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>flags,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Plays a sound at a specified postition.</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>int snd_play(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>cid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>sid,</td></tr><tr><td></td><td class=PType nowrap>int </td><td class=PParameter nowrap>flags</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Plays a sound.</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_stop(</td><td class=PType nowrap>int </td><td class=PParameter nowrap>id</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Stops a currenly playing sound.</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>void snd_set_listener_pos(</td><td class=PType nowrap>float </td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PType nowrap>float </td><td class=PParameter nowrap>y</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Sets the listener posititon.</div></div><!--END_ND_TOOLTIPS-->
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
|
||
|
|
||
|
|
||
|
<script language=JavaScript><!--
|
||
|
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>
|