272 lines
11 KiB
HTML
272 lines
11 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
|
|
<title>JGE++: JSoundSystem Class Reference</title>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
</head><body>
|
|
<!-- Generated by Doxygen 1.5.3 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="annotated.html"><span>Classes</span></a></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>
|
|
<h1>JSoundSystem Class Reference</h1><!-- doxytag: class="JSoundSystem" --><code>#include <JSoundSystem.h></code>
|
|
<p>
|
|
<div class="dynheader">
|
|
Collaboration diagram for JSoundSystem:</div>
|
|
<div class="dynsection">
|
|
</div>
|
|
|
|
<p>
|
|
<a href="class_j_sound_system-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">JMusic * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#711086ec563dfbb2448405f8991505b4">LoadMusic</a> (const char *fileName)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#19729b7d82ec8ab87b0c47d499deb7c6">PlayMusic</a> (JMusic *music, bool looping=false)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#66fac9ea232cd4b832f84855fd4a8741">StopMusic</a> (JMusic *music)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#d7a799d5a825e9e3f4edb0f6c60aa663">ResumeMusic</a> (JMusic *music)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">JSample * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#fd2ed341762e1b302db678fbc85bbac7">LoadSample</a> (const char *fileName)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#3e8709a6cb6a1f25d086a22d7f1f7a57">PlaySample</a> (JSample *sample)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#4b4002c2411fdffcaef6fd6713641ac6">SetVolume</a> (int volume)</td></tr>
|
|
|
|
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">static <a class="el" href="class_j_sound_system.html">JSoundSystem</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="class_j_sound_system.html#6d92ab59fcd46c0a970a56f2f33fbc66">GetInstance</a> ()</td></tr>
|
|
|
|
</table>
|
|
<hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
Sound engine for playing sound effects (WAV) and background music (MP3). <hr><h2>Member Function Documentation</h2>
|
|
<a class="anchor" name="6d92ab59fcd46c0a970a56f2f33fbc66"></a><!-- doxytag: member="JSoundSystem::GetInstance" ref="6d92ab59fcd46c0a970a56f2f33fbc66" args="()" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">static <a class="el" href="class_j_sound_system.html">JSoundSystem</a>* JSoundSystem::GetInstance </td>
|
|
<td>(</td>
|
|
<td class="paramname"> </td>
|
|
<td> ) </td>
|
|
<td width="100%"><code> [static]</code></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Get the singleton instance
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="711086ec563dfbb2448405f8991505b4"></a><!-- doxytag: member="JSoundSystem::LoadMusic" ref="711086ec563dfbb2448405f8991505b4" args="(const char *fileName)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">JMusic* JSoundSystem::LoadMusic </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>fileName</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Load music.<p>
|
|
<dl class="note" compact><dt><b>Note:</b></dt><dd>MP3 is the only supported format for the moment.</dd></dl>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>filename</em> </td><td>- Name of the music file. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="19729b7d82ec8ab87b0c47d499deb7c6"></a><!-- doxytag: member="JSoundSystem::PlayMusic" ref="19729b7d82ec8ab87b0c47d499deb7c6" args="(JMusic *music, bool looping=false)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JSoundSystem::PlayMusic </td>
|
|
<td>(</td>
|
|
<td class="paramtype">JMusic * </td>
|
|
<td class="paramname"> <em>music</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="paramkey"></td>
|
|
<td></td>
|
|
<td class="paramtype">bool </td>
|
|
<td class="paramname"> <em>looping</em> = <code>false</code></td><td> </td>
|
|
</tr>
|
|
<tr>
|
|
<td></td>
|
|
<td>)</td>
|
|
<td></td><td></td><td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Delete music from memory.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>music</em> </td><td>- Music to be deleted. Play music.</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>music</em> </td><td>- Music to be played. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>looping</em> </td><td>- Play the music in a loop. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="66fac9ea232cd4b832f84855fd4a8741"></a><!-- doxytag: member="JSoundSystem::StopMusic" ref="66fac9ea232cd4b832f84855fd4a8741" args="(JMusic *music)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JSoundSystem::StopMusic </td>
|
|
<td>(</td>
|
|
<td class="paramtype">JMusic * </td>
|
|
<td class="paramname"> <em>music</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Stop playing.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>music</em> </td><td>- Music to be stopped. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="d7a799d5a825e9e3f4edb0f6c60aa663"></a><!-- doxytag: member="JSoundSystem::ResumeMusic" ref="d7a799d5a825e9e3f4edb0f6c60aa663" args="(JMusic *music)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JSoundSystem::ResumeMusic </td>
|
|
<td>(</td>
|
|
<td class="paramtype">JMusic * </td>
|
|
<td class="paramname"> <em>music</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Resume playing.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>music</em> </td><td>- Music to be resumed. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="fd2ed341762e1b302db678fbc85bbac7"></a><!-- doxytag: member="JSoundSystem::LoadSample" ref="fd2ed341762e1b302db678fbc85bbac7" args="(const char *fileName)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">JSample* JSoundSystem::LoadSample </td>
|
|
<td>(</td>
|
|
<td class="paramtype">const char * </td>
|
|
<td class="paramname"> <em>fileName</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Load sound effect.<p>
|
|
<dl class="note" compact><dt><b>Note:</b></dt><dd>WAV sound effect only.</dd></dl>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>fileName</em> </td><td>- Sound effect for loading. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="3e8709a6cb6a1f25d086a22d7f1f7a57"></a><!-- doxytag: member="JSoundSystem::PlaySample" ref="3e8709a6cb6a1f25d086a22d7f1f7a57" args="(JSample *sample)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JSoundSystem::PlaySample </td>
|
|
<td>(</td>
|
|
<td class="paramtype">JSample * </td>
|
|
<td class="paramname"> <em>sample</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Delete sound effect from memory.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>sample</em> </td><td>- Sound to be deleted. Play sound effect.</td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>sample</em> </td><td>- Sound for playing. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<a class="anchor" name="4b4002c2411fdffcaef6fd6713641ac6"></a><!-- doxytag: member="JSoundSystem::SetVolume" ref="4b4002c2411fdffcaef6fd6713641ac6" args="(int volume)" -->
|
|
<div class="memitem">
|
|
<div class="memproto">
|
|
<table class="memname">
|
|
<tr>
|
|
<td class="memname">void JSoundSystem::SetVolume </td>
|
|
<td>(</td>
|
|
<td class="paramtype">int </td>
|
|
<td class="paramname"> <em>volume</em> </td>
|
|
<td> ) </td>
|
|
<td width="100%"></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div class="memdoc">
|
|
|
|
<p>
|
|
Set volume for audio playback.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>volume</em> </td><td>- New volume. </td></tr>
|
|
</table>
|
|
</dl>
|
|
|
|
</div>
|
|
</div><p>
|
|
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Oct 22 00:28:22 2007 for JGE++ by
|
|
<a href="http://www.doxygen.org/index.html">
|
|
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.3 </small></address>
|
|
</body>
|
|
</html>
|