Tom Lint 92e29ba3dd Fixed compiler errors
Regenerated JavaDoc
Updated whitespace usage
Added LWJGL libraries and binaries
2013-10-15 12:34:51 +02:00

664 lines
29 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="nl">
<head>
<!-- Generated by javadoc (version 1.7.0_40) on Tue Oct 15 12:25:30 CEST 2013 -->
<title>SoundEffect</title>
<meta name="date" content="2013-10-15">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SoundEffect";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SoundEffect.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../Microsoft/Xna/Framework/Audio/NoAudioHardwareException.html" title="class in Microsoft.Xna.Framework.Audio"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html" title="class in Microsoft.Xna.Framework.Audio"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?Microsoft/Xna/Framework/Audio/SoundEffect.html" target="_top">Frames</a></li>
<li><a href="SoundEffect.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">Microsoft.Xna.Framework.Audio</div>
<h2 title="Class SoundEffect" class="title">Class SoundEffect</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>Microsoft.Xna.Framework.Audio.SoundEffect</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../System/IDisposable.html" title="interface in System">IDisposable</a></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">SoundEffect</span>
extends java.lang.Object
implements <a href="../../../../System/IDisposable.html" title="interface in System">IDisposable</a></pre>
<div class="block">Reference page contains links to related code samples.</div>
<dl><dt><span class="strong">Author:</span></dt>
<dd>Halofreak1990</dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#SoundEffect(byte[], int, Microsoft.Xna.Framework.Audio.AudioChannels)">SoundEffect</a></strong>(byte[]&nbsp;buffer,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</code>
<div class="block">Initializes a new instance of SoundEffect based on an audio buffer, sample rate, and number of audio channels.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#SoundEffect(byte[], int, int, int, Microsoft.Xna.Framework.Audio.AudioChannels, int, int)">SoundEffect</a></strong>(byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;count,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels,
int&nbsp;loopStart,
int&nbsp;loopLength)</code>
<div class="block">Initializes a new instance of SoundEffect with specified parameters such as audio sample rate, channels, looping criteria, and a buffer to hold the audio.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#CreateInstance()">CreateInstance</a></strong>()</code>
<div class="block">Creates a new SoundEffectInstance for this SoundEffect.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#Dispose()">Dispose</a></strong>()</code>
<div class="block">Releases the resources used by the SoundEffect.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#Dispose(boolean)">Dispose</a></strong>(boolean&nbsp;disposing)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#finalize()">finalize</a></strong>()</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffect</a></code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#FromStream(java.io.InputStream)">FromStream</a></strong>(java.io.InputStream&nbsp;stream)</code>
<div class="block">Creates a SoundEffect object based on the specified data stream.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffect</a></code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#FromStream(System.IO.Stream)">FromStream</a></strong>(<a href="../../../../System/IO/Stream.html" title="class in System.IO">Stream</a>&nbsp;stream)</code>
<div class="block">Creates a SoundEffect object based on the specified data stream.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getDistanceScale()">getDistanceScale</a></strong>()</code>
<div class="block">Gets a value that adjusts the effect of distance calculations on the sound (emitter).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getDopplerScale()">getDopplerScale</a></strong>()</code>
<div class="block">Gets a value that adjusts the effect of doppler calculations on the sound (emitter).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a></code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getDuration()">getDuration</a></strong>()</code>
<div class="block">Gets the duration of the SoundEffect.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getMasterVolume()">getMasterVolume</a></strong>()</code>
<div class="block">Gets the master volume that affects all SoundEffectInstance sounds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getName()">getName</a></strong>()</code>
<div class="block">Gets the asset name of the SoundEffect.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a></code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#GetSampleDuration(int, int, Microsoft.Xna.Framework.Audio.AudioChannels)">GetSampleDuration</a></strong>(int&nbsp;sizeInBytes,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</code>
<div class="block">Returns the sample duration based on the specified sample size and sample rate.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#GetSampleSizeInBytes(System.TimeSpan, int, Microsoft.Xna.Framework.Audio.AudioChannels)">GetSampleSizeInBytes</a></strong>(<a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a>&nbsp;duration,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</code>
<div class="block">Returns the size of the audio sample based on duration, sample rate, and audio channels.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static float</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#getSpeedOfSound()">getSpeedOfSound</a></strong>()</code>
<div class="block">Returns the speed of sound. 343.5 meters per second.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#IsDisposed()">IsDisposed</a></strong>()</code>
<div class="block">Gets a value that indicates whether the object is disposed.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#Play()">Play</a></strong>()</code>
<div class="block">Plays a sound.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#Play(float, float, float)">Play</a></strong>(float&nbsp;volume,
float&nbsp;pitch,
float&nbsp;pan)</code>
<div class="block">Plays a sound based on specified volume, pitch, and panning.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#setDistanceScale(float)">setDistanceScale</a></strong>(float&nbsp;value)</code>
<div class="block">Sets a value that adjusts the effect of distance calculations on the sound (emitter).</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#setDopplerScale(float)">setDopplerScale</a></strong>(float&nbsp;value)</code>
<div class="block">Sets a value that adjusts the effect of doppler calculations on the sound (emitter).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#setMasterVolume(float)">setMasterVolume</a></strong>(float&nbsp;value)</code>
<div class="block">Sets the master volume that affects all SoundEffectInstance sounds.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#setName(java.lang.String)">setName</a></strong>(java.lang.String&nbsp;value)</code>
<div class="block">Sets the asset name of the SoundEffect to the specified value.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><strong><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html#setSpeedOfSound(float)">setSpeedOfSound</a></strong>(float&nbsp;value)</code>
<div class="block">Sets the speed of sound.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="SoundEffect(byte[], int, Microsoft.Xna.Framework.Audio.AudioChannels)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>SoundEffect</h4>
<pre>public&nbsp;SoundEffect(byte[]&nbsp;buffer,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</pre>
<div class="block">Initializes a new instance of SoundEffect based on an audio buffer, sample rate, and number of audio channels. Reference page contains links to related conceptual articles.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - Buffer that contains the audio data. The audio format must be PCM wave data.</dd><dd><code>sampleRate</code> - Sample rate, in Hertz (Hz), of audio data.</dd><dd><code>channels</code> - Number of channels (mono or stereo) of audio data.</dd></dl>
</li>
</ul>
<a name="SoundEffect(byte[], int, int, int, Microsoft.Xna.Framework.Audio.AudioChannels, int, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SoundEffect</h4>
<pre>public&nbsp;SoundEffect(byte[]&nbsp;buffer,
int&nbsp;offset,
int&nbsp;count,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels,
int&nbsp;loopStart,
int&nbsp;loopLength)</pre>
<div class="block">Initializes a new instance of SoundEffect with specified parameters such as audio sample rate, channels, looping criteria, and a buffer to hold the audio. Reference page contains links to related conceptual articles.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>buffer</code> - Buffer that contains the audio data. The audio format must be PCM wave data.</dd><dd><code>offset</code> - Offset, in bytes, to the starting position of the audio data.</dd><dd><code>count</code> - Amount, in bytes, of audio data.</dd><dd><code>sampleRate</code> - Sample rate, in Hertz (Hz), of audio data.</dd><dd><code>channels</code> - Number of channels (mono or stereo) of audio data.</dd><dd><code>loopStart</code> - Loop start in samples.</dd><dd><code>loopLength</code> - Loop length in samples.</dd></dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getDistanceScale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDistanceScale</h4>
<pre>public static&nbsp;float&nbsp;getDistanceScale()</pre>
<div class="block">Gets a value that adjusts the effect of distance calculations on the sound (emitter).</div>
</li>
</ul>
<a name="setDistanceScale(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDistanceScale</h4>
<pre>public static&nbsp;void&nbsp;setDistanceScale(float&nbsp;value)</pre>
<div class="block">Sets a value that adjusts the effect of distance calculations on the sound (emitter).</div>
</li>
</ul>
<a name="getDopplerScale()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDopplerScale</h4>
<pre>public static&nbsp;float&nbsp;getDopplerScale()</pre>
<div class="block">Gets a value that adjusts the effect of doppler calculations on the sound (emitter).</div>
</li>
</ul>
<a name="setDopplerScale(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDopplerScale</h4>
<pre>public static&nbsp;void&nbsp;setDopplerScale(float&nbsp;value)</pre>
<div class="block">Sets a value that adjusts the effect of doppler calculations on the sound (emitter).</div>
</li>
</ul>
<a name="getDuration()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDuration</h4>
<pre>public&nbsp;<a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a>&nbsp;getDuration()</pre>
<div class="block">Gets the duration of the SoundEffect.</div>
</li>
</ul>
<a name="IsDisposed()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>IsDisposed</h4>
<pre>public&nbsp;boolean&nbsp;IsDisposed()</pre>
<div class="block">Gets a value that indicates whether the object is disposed.</div>
</li>
</ul>
<a name="getMasterVolume()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMasterVolume</h4>
<pre>public static&nbsp;float&nbsp;getMasterVolume()</pre>
<div class="block">Gets the master volume that affects all SoundEffectInstance sounds.</div>
</li>
</ul>
<a name="setMasterVolume(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMasterVolume</h4>
<pre>public static&nbsp;void&nbsp;setMasterVolume(float&nbsp;value)</pre>
<div class="block">Sets the master volume that affects all SoundEffectInstance sounds.</div>
</li>
</ul>
<a name="getName()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getName</h4>
<pre>public&nbsp;java.lang.String&nbsp;getName()</pre>
<div class="block">Gets the asset name of the SoundEffect.</div>
</li>
</ul>
<a name="setName(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setName</h4>
<pre>public&nbsp;void&nbsp;setName(java.lang.String&nbsp;value)</pre>
<div class="block">Sets the asset name of the SoundEffect to the specified value.</div>
</li>
</ul>
<a name="getSpeedOfSound()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSpeedOfSound</h4>
<pre>public static&nbsp;float&nbsp;getSpeedOfSound()</pre>
<div class="block">Returns the speed of sound. 343.5 meters per second.</div>
</li>
</ul>
<a name="setSpeedOfSound(float)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSpeedOfSound</h4>
<pre>public static&nbsp;void&nbsp;setSpeedOfSound(float&nbsp;value)</pre>
<div class="block">Sets the speed of sound.</div>
</li>
</ul>
<a name="CreateInstance()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>CreateInstance</h4>
<pre>public&nbsp;<a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a>&nbsp;CreateInstance()</pre>
<div class="block">Creates a new SoundEffectInstance for this SoundEffect. Reference page contains links to related code samples.</div>
</li>
</ul>
<a name="Dispose()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Dispose</h4>
<pre>public&nbsp;void&nbsp;Dispose()</pre>
<div class="block">Releases the resources used by the SoundEffect.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../System/IDisposable.html#Dispose()">Dispose</a></code>&nbsp;in interface&nbsp;<code><a href="../../../../System/IDisposable.html" title="interface in System">IDisposable</a></code></dd>
</dl>
</li>
</ul>
<a name="Dispose(boolean)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Dispose</h4>
<pre>protected&nbsp;void&nbsp;Dispose(boolean&nbsp;disposing)</pre>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>disposing</code> - </dd></dl>
</li>
</ul>
<a name="finalize()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>finalize</h4>
<pre>protected&nbsp;void&nbsp;finalize()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>finalize</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="FromStream(System.IO.Stream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FromStream</h4>
<pre>public static&nbsp;<a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffect</a>&nbsp;FromStream(<a href="../../../../System/IO/Stream.html" title="class in System.IO">Stream</a>&nbsp;stream)</pre>
<div class="block">Creates a SoundEffect object based on the specified data stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - Stream object that contains the data for this SoundEffect object.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../../System/ArgumentNullException.html" title="class in System">ArgumentNullException</a></code> - stream is null.</dd></dl>
</li>
</ul>
<a name="FromStream(java.io.InputStream)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>FromStream</h4>
<pre>public static&nbsp;<a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffect.html" title="class in Microsoft.Xna.Framework.Audio">SoundEffect</a>&nbsp;FromStream(java.io.InputStream&nbsp;stream)</pre>
<div class="block">Creates a SoundEffect object based on the specified data stream.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>stream</code> - InputStream object that contains the data for this SoundEffect object.</dd></dl>
</li>
</ul>
<a name="GetSampleDuration(int, int, Microsoft.Xna.Framework.Audio.AudioChannels)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GetSampleDuration</h4>
<pre>public static&nbsp;<a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a>&nbsp;GetSampleDuration(int&nbsp;sizeInBytes,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</pre>
<div class="block">Returns the sample duration based on the specified sample size and sample rate.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>sizeInBytes</code> - Size, in bytes, of audio data.</dd><dd><code>sampleRate</code> - Sample rate, in Hertz (Hz), of audio content. The sampleRate must be between 8000 Hz and 48000 Hz.</dd><dd><code>channels</code> - Number of channels in the audio data.</dd></dl>
</li>
</ul>
<a name="GetSampleSizeInBytes(System.TimeSpan, int, Microsoft.Xna.Framework.Audio.AudioChannels)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>GetSampleSizeInBytes</h4>
<pre>public static&nbsp;int&nbsp;GetSampleSizeInBytes(<a href="../../../../System/TimeSpan.html" title="class in System">TimeSpan</a>&nbsp;duration,
int&nbsp;sampleRate,
<a href="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html" title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a>&nbsp;channels)</pre>
<div class="block">Returns the size of the audio sample based on duration, sample rate, and audio channels.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>duration</code> - TimeSpan object that contains the sample duration.</dd><dd><code>sampleRate</code> - Sample rate, in Hertz (Hz), of audio content. The sampleRate parameter must be between 8,000 Hz and 48,000 Hz.</dd><dd><code>channels</code> - Number of channels in the audio data.</dd></dl>
</li>
</ul>
<a name="Play()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>Play</h4>
<pre>public&nbsp;boolean&nbsp;Play()</pre>
<div class="block">Plays a sound. Reference page contains links to related code samples.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>True if successful, false otherwise.</dd></dl>
</li>
</ul>
<a name="Play(float, float, float)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Play</h4>
<pre>public&nbsp;boolean&nbsp;Play(float&nbsp;volume,
float&nbsp;pitch,
float&nbsp;pan)</pre>
<div class="block">Plays a sound based on specified volume, pitch, and panning. Reference page contains links to related code samples.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>volume</code> - Volume, ranging from 0.0f (silence) to 1.0f (full volume). 1.0f is full volume relative to SoundEffect.MasterVolume.</dd><dd><code>pitch</code> - Pitch adjustment, ranging from -1.0f (down one octave) to 1.0f (up one octave). 0.0f is unity (normal) pitch.</dd><dd><code>pan</code> - Panning, ranging from -1.0f (full left) to 1.0f (full right). 0.0f is centered.</dd>
<dt><span class="strong">Returns:</span></dt><dd>True if successful, false otherwise.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/SoundEffect.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../Microsoft/Xna/Framework/Audio/NoAudioHardwareException.html" title="class in Microsoft.Xna.Framework.Audio"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html" title="class in Microsoft.Xna.Framework.Audio"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?Microsoft/Xna/Framework/Audio/SoundEffect.html" target="_top">Frames</a></li>
<li><a href="SoundEffect.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>