C# Class Microsoft.Xna.Framework.Audio.SoundEffectInstance

Inheritance: IDisposable
Afficher le fichier Open project: procfxgen/MGShaderEditor Class Usage Examples

Private Properties

Свойство Type Description
PlatformApply3D void
PlatformDispose void
PlatformGetIsLooped bool
PlatformGetState SoundState
PlatformInitialize void
PlatformPause void
PlatformPlay void
PlatformResume void
PlatformSetIsLooped void
PlatformSetPan void
PlatformSetPitch void
PlatformSetVolume void
PlatformStop void
SoundEffectInstance System
SoundEffectInstance System
XnaPitchToAlPitch float
XnaVolumeAndPanToAndroidVolume void

Méthodes publiques

Méthode Description
Apply3D ( Microsoft.Xna.Framework.Audio.AudioListener listener, Microsoft.Xna.Framework.Audio.AudioEmitter emitter ) : void

Applies 3D positioning to the SoundEffectInstance using a single listener.

Dispose ( ) : void

Releases the resources held by this Microsoft.Xna.Framework.Audio.SoundEffectInstance.

Pause ( ) : void

Pauses playback of a SoundEffectInstance.

Paused instances can be resumed with SoundEffectInstance.Play() or SoundEffectInstance.Resume().

Play ( ) : void

Plays or resumes a SoundEffectInstance.

Throws an exception if more sounds are playing than the platform allows.

Resume ( ) : void

Resumes playback for a SoundEffectInstance.

Only has effect on a SoundEffectInstance in a paused state.

Stop ( ) : void

Immediately stops playing a SoundEffectInstance.

Stop ( bool immediate ) : void

Stops playing a SoundEffectInstance, either immediately or as authored.

Stopping a sound with the immediate argument set to false will allow it to play any release phases, such as fade, before coming to a stop.

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Releases the resources held by this Microsoft.Xna.Framework.Audio.SoundEffectInstance.

If the disposing parameter is true, the Dispose method was called explicitly. This means that managed objects referenced by this instance should be disposed or released as required. If the disposing parameter is false, Dispose was called by the finalizer and no managed objects should be touched because we do not know if they are still valid or not at that time. Unmanaged resources should always be released.

Private Methods

Méthode Description
PlatformApply3D ( AudioListener listener, AudioEmitter emitter ) : void
PlatformDispose ( bool disposing ) : void
PlatformGetIsLooped ( ) : bool
PlatformGetState ( ) : SoundState
PlatformInitialize ( byte buffer, int sampleRate, int channels ) : void

Creates a standalone SoundEffectInstance from given wavedata.

PlatformPause ( ) : void
PlatformPlay ( ) : void
PlatformResume ( ) : void
PlatformSetIsLooped ( bool value ) : void
PlatformSetPan ( float value ) : void
PlatformSetPitch ( float value ) : void
PlatformSetVolume ( float value ) : void
PlatformStop ( bool immediate ) : void
SoundEffectInstance ( ) : System
SoundEffectInstance ( byte buffer, int sampleRate, int channels ) : System
XnaPitchToAlPitch ( float xnaPitch ) : float

Converts the XNA [-1, 1] pitch range to OpenAL pitch (0, INF) or Android SoundPool playback rate [0.5, 2]. The pitch of the sound in the Microsoft XNA range.

XnaVolumeAndPanToAndroidVolume ( float xnaVolume, float xnaPan, float &leftVolume, float &rightVolume ) : void

Converts the XNA volume [0, 1] and pan [-1, 1] to Android SoundPool left and right volume [0, 1]. The volume of the sound in the Microsoft XNA range. The pan of the sound in the Microsoft XNA range. Android SoundPool left volume. Android SoundPool right volume.

Method Details

Apply3D() public méthode

Applies 3D positioning to the SoundEffectInstance using a single listener.
public Apply3D ( Microsoft.Xna.Framework.Audio.AudioListener listener, Microsoft.Xna.Framework.Audio.AudioEmitter emitter ) : void
listener Microsoft.Xna.Framework.Audio.AudioListener Data about the listener.
emitter Microsoft.Xna.Framework.Audio.AudioEmitter Data about the source of emission.
Résultat void

Dispose() public méthode

Releases the resources held by this Microsoft.Xna.Framework.Audio.SoundEffectInstance.
public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Releases the resources held by this Microsoft.Xna.Framework.Audio.SoundEffectInstance.
If the disposing parameter is true, the Dispose method was called explicitly. This means that managed objects referenced by this instance should be disposed or released as required. If the disposing parameter is false, Dispose was called by the finalizer and no managed objects should be touched because we do not know if they are still valid or not at that time. Unmanaged resources should always be released.
protected Dispose ( bool disposing ) : void
disposing bool If set to true, Dispose was called explicitly.
Résultat void

Pause() public méthode

Pauses playback of a SoundEffectInstance.
Paused instances can be resumed with SoundEffectInstance.Play() or SoundEffectInstance.Resume().
public Pause ( ) : void
Résultat void

Play() public méthode

Plays or resumes a SoundEffectInstance.
Throws an exception if more sounds are playing than the platform allows.
public Play ( ) : void
Résultat void

Resume() public méthode

Resumes playback for a SoundEffectInstance.
Only has effect on a SoundEffectInstance in a paused state.
public Resume ( ) : void
Résultat void

Stop() public méthode

Immediately stops playing a SoundEffectInstance.
public Stop ( ) : void
Résultat void

Stop() public méthode

Stops playing a SoundEffectInstance, either immediately or as authored.
Stopping a sound with the immediate argument set to false will allow it to play any release phases, such as fade, before coming to a stop.
public Stop ( bool immediate ) : void
immediate bool Determined whether the sound stops immediately, or after playing its release phase and/or transitions.
Résultat void