<li><ahref="../../../../Microsoft/Xna/Framework/Audio/AudioListener.html"title="class in Microsoft.Xna.Framework.Audio"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../Microsoft/Xna/Framework/Audio/NoAudioHardwareException.html"title="class in Microsoft.Xna.Framework.Audio"><spanclass="strong">Next Class</span></a></li>
<li><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">Microsoft.Xna.Framework.Audio.SoundEffectInstance</a></li>
<dd><ahref="../../../../System/IDisposable.html"title="interface in System">IDisposable</a></dd>
</dl>
<hr>
<br>
<pre>public final class <spanclass="strong">DynamicSoundEffectInstance</span>
extends <ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></pre>
<divclass="block">Provides properties, methods, and events for play back of the audio buffer.</div>
<thclass="colFirst"scope="col">Modifier and Type</th>
<thclass="colLast"scope="col">Field and Description</th>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code><ahref="../../../../System/Event.html"title="class in System">Event</a><<ahref="../../../../System/EventArgs.html"title="class in System">EventArgs</a>></code></td>
<h3>Fields inherited from class Microsoft.Xna.Framework.Audio.<ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></h3>
<ahref="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html"title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a> channels)</code>
<divclass="block">Initializes a new instance of this class, which creates a dynamic sound effect based on the specified sample rate and audio channel.</div>
<divclass="block">Returns the sample duration based on the specified size of the audio buffer.</div>
</td>
</tr>
<trclass="altColor">
<tdclass="colFirst"><code>int</code></td>
<tdclass="colLast"><code><strong><ahref="../../../../Microsoft/Xna/Framework/Audio/DynamicSoundEffectInstance.html#GetSampleSizeInBytes(System.TimeSpan)">GetSampleSizeInBytes</a></strong>(<ahref="../../../../System/TimeSpan.html"title="class in System">TimeSpan</a> duration)</code>
<divclass="block">Returns the size of the audio buffer required to contain audio samples based on the specified duration.</div>
<h3>Methods inherited from class Microsoft.Xna.Framework.Audio.<ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></h3>
<pre>public final <ahref="../../../../System/Event.html"title="class in System">Event</a><<ahref="../../../../System/EventArgs.html"title="class in System">EventArgs</a>> BufferNeeded</pre>
<divclass="block">Event that occurs when the number of audio capture buffers awaiting playback is less than or equal to two.</div>
<ahref="../../../../Microsoft/Xna/Framework/Audio/AudioChannels.html"title="enum in Microsoft.Xna.Framework.Audio">AudioChannels</a> channels)</pre>
<divclass="block">Initializes a new instance of this class, which creates a dynamic sound effect based on the specified sample rate and audio channel.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>sampleRate</code> - Sample rate, in Hertz (Hz), of audio content.</dd><dd><code>channels</code> - Number of channels in the audio data.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../../../../System/ArgumentOutOfRangeException.html"title="class in System">ArgumentOutOfRangeException</a></code></dd></dl>
<divclass="block"><strong>Description copied from class: <code><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html#Dispose(boolean)">SoundEffectInstance</a></code></strong></div>
<divclass="block">Releases the unmanaged resources held by this SoundEffectInstance, and optionally releases the managed resources.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html#Dispose(boolean)">Dispose</a></code> in class <code><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></code></dd>
<dt><spanclass="strong">Parameters:</span></dt><dd><code>disposing</code> - Pass true to release both the managed and unmanaged resources for this SoundEffectInstance. Passing false releases only the unmanaged resources.</dd></dl>
</li>
</ul>
<aname="GetSampleDuration(int)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>GetSampleDuration</h4>
<pre>public <ahref="../../../../System/TimeSpan.html"title="class in System">TimeSpan</a> GetSampleDuration(int sizeInBytes)</pre>
<divclass="block">Returns the sample duration based on the specified size of the audio buffer.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>sizeInBytes</code> - Size, in bytes, of the audio data.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../../../../System/ObjectDisposedException.html"title="class in System">ObjectDisposedException</a></code></dd>
<dd><code><ahref="../../../../System/ArgumentException.html"title="class in System">ArgumentException</a></code></dd></dl>
</li>
</ul>
<aname="GetSampleSizeInBytes(System.TimeSpan)">
<!---->
</a>
<ulclass="blockList">
<liclass="blockList">
<h4>GetSampleSizeInBytes</h4>
<pre>public int GetSampleSizeInBytes(<ahref="../../../../System/TimeSpan.html"title="class in System">TimeSpan</a> duration)</pre>
<divclass="block">Returns the size of the audio buffer required to contain audio samples based on the specified duration.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>duration</code> - TimeSpan object that contains the duration of the audio sample.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../../../../System/ObjectDisposedException.html"title="class in System">ObjectDisposedException</a></code></dd>
<divclass="block">Begins or resumes audio playback.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html#Play()">Play</a></code> in class <code><ahref="../../../../Microsoft/Xna/Framework/Audio/SoundEffectInstance.html"title="class in Microsoft.Xna.Framework.Audio">SoundEffectInstance</a></code></dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../../../../System/ObjectDisposedException.html"title="class in System">ObjectDisposedException</a></code></dd></dl>
<divclass="block">Submits an audio buffer for playback. Playback starts at the beginning, and the buffer is played in its entirety.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>buffer</code> - Buffer that contains the audio data. The audio format must be PCM wave data.</dd></dl>
<divclass="block">Submits an audio buffer for playback. Playback begins at the specified offset, and the byte count determines the size of the sample played.</div>
<dl><dt><spanclass="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 data.</dd><dd><code>count</code> - Amount, in bytes, of data sent.</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code><ahref="../../../../System/ObjectDisposedException.html"title="class in System">ObjectDisposedException</a></code></dd>
<dd><code><ahref="../../../../System/ArgumentException.html"title="class in System">ArgumentException</a></code></dd></dl>
<li><ahref="../../../../Microsoft/Xna/Framework/Audio/AudioListener.html"title="class in Microsoft.Xna.Framework.Audio"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../Microsoft/Xna/Framework/Audio/NoAudioHardwareException.html"title="class in Microsoft.Xna.Framework.Audio"><spanclass="strong">Next Class</span></a></li>