C# Класс Microsoft.Xna.Framework.Audio.SoundEffectInstance

Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

Apply3D() публичный Метод

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.
Результат void

Dispose() публичный Метод

Releases the resources held by this Microsoft.Xna.Framework.Audio.SoundEffectInstance.
public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

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.
Результат void

Pause() публичный Метод

Pauses playback of a SoundEffectInstance.
Paused instances can be resumed with SoundEffectInstance.Play() or SoundEffectInstance.Resume().
public Pause ( ) : void
Результат void

Play() публичный Метод

Plays or resumes a SoundEffectInstance.
Throws an exception if more sounds are playing than the platform allows.
public Play ( ) : void
Результат void

Resume() публичный Метод

Resumes playback for a SoundEffectInstance.
Only has effect on a SoundEffectInstance in a paused state.
public Resume ( ) : void
Результат void

Stop() публичный Метод

Immediately stops playing a SoundEffectInstance.
public Stop ( ) : void
Результат void

Stop() публичный Метод

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.
Результат void