Search Results for

    Show / Hide Table of Contents

    Class XAudioSource

    The audio source class.

    Inheritance
    object
    AudioSource
    XAudioSource
    Implements
    IDisposable
    Inherited Members
    AudioSource.Format
    AudioSource.Volume
    AudioSource.Pan
    AudioSource.Pitch
    AudioSource.IsLooped
    AudioSource.State
    AudioSource.PlayPosition
    AudioSource.QueuePlayPosition
    AudioSource.QueueDuration
    AudioSource.CurrentBuffer
    AudioSource.PendingBuffers
    AudioSource.PendingBuffersCount
    AudioSource.BufferStarted
    AudioSource.BufferEnded
    AudioSource.EnqueueBuffer(AudioBuffer)
    AudioSource.Play()
    AudioSource.Pause()
    AudioSource.Stop()
    AudioSource.OnBufferStart()
    AudioSource.OnBufferProccessed(bool)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Evergine.XAudio2
    Assembly: Evergine.XAudio2.dll
    Syntax
    public class XAudioSource : AudioSource, IDisposable

    Constructors

    XAudioSource(XAudioDevice, WaveFormat)

    Initializes a new instance of the XAudioSource class.

    Declaration
    public XAudioSource(XAudioDevice device, WaveFormat format)
    Parameters
    Type Name Description
    XAudioDevice device

    The XAudio device.

    WaveFormat format

    The XAudios format.

    Fields

    Voice

    Gets the source voice.

    Declaration
    public readonly IXAudio2SourceVoice Voice
    Field Value
    Type Description
    IXAudio2SourceVoice

    Methods

    Apply3D(AudioEmitter)

    Sets the ·D properties of the Audio Source according to an audio emitter.

    Declaration
    public override void Apply3D(AudioEmitter emitter)
    Parameters
    Type Name Description
    AudioEmitter emitter

    The audio emitter.

    Overrides
    AudioSource.Apply3D(AudioEmitter)

    Dispose()

    Declaration
    public override void Dispose()
    Overrides
    AudioSource.Dispose()

    FlushBuffers()

    Flush all the audio buffers.

    Declaration
    public override void FlushBuffers()
    Overrides
    AudioSource.FlushBuffers()

    GetPlayPosition()

    Gets the play TimeSpan position of the audio.

    Declaration
    protected override TimeSpan GetPlayPosition()
    Returns
    Type Description
    TimeSpan

    A TimeSpan with the current play position.

    Overrides
    AudioSource.GetPlayPosition()

    GetQueuePlayPosition()

    Gets the Queue Play TimeSpan Position.

    Declaration
    protected override TimeSpan GetQueuePlayPosition()
    Returns
    Type Description
    TimeSpan

    A TimeSpan with the Queue Play Position.

    Overrides
    AudioSource.GetQueuePlayPosition()

    InternalEnqueueBuffer(AudioBuffer, out int?)

    Enqueues an audio buffer into the source.

    Declaration
    protected override void InternalEnqueueBuffer(AudioBuffer buffer, out int? index)
    Parameters
    Type Name Description
    AudioBuffer buffer

    The buffer to be enqueued.

    int? index

    Output variable containing the buffer index.

    Overrides
    AudioSource.InternalEnqueueBuffer(AudioBuffer, out int?)

    InternalPause()

    Pauses the audio source.

    Declaration
    protected override void InternalPause()
    Overrides
    AudioSource.InternalPause()

    InternalPlay()

    Plays the audio source.

    Declaration
    protected override void InternalPlay()
    Overrides
    AudioSource.InternalPlay()

    InternalStop()

    Stops the audio source.

    Declaration
    protected override void InternalStop()
    Overrides
    AudioSource.InternalStop()

    IsPaused()

    Checks if this audio source is paused.

    Declaration
    protected override bool IsPaused()
    Returns
    Type Description
    bool

    True if this audio source is pause. False otherwise.

    Overrides
    AudioSource.IsPaused()

    IsPlaying()

    Checks if the source is playing.

    Declaration
    protected override bool IsPlaying()
    Returns
    Type Description
    bool

    True if the audio source is playing. False otherwise.

    Overrides
    AudioSource.IsPlaying()

    SetLoop(bool)

    Sets a new value to indicate if the source is looped.

    Declaration
    protected override void SetLoop(bool isLooped)
    Parameters
    Type Name Description
    bool isLooped

    If the source must loop the sound.

    Overrides
    AudioSource.SetLoop(bool)

    SetPan(float)

    Sets the pan of this audio source.

    Declaration
    protected override void SetPan(float pan)
    Parameters
    Type Name Description
    float pan

    The new pan.

    Overrides
    AudioSource.SetPan(float)

    SetPitch(float)

    Sets the new pitch of this source.

    Declaration
    protected override void SetPitch(float pitch)
    Parameters
    Type Name Description
    float pitch

    The new pitch.

    Overrides
    AudioSource.SetPitch(float)

    SetQueuePlayPosition(TimeSpan)

    Sets the queue play TimeSpan position.

    Declaration
    protected override void SetQueuePlayPosition(TimeSpan position)
    Parameters
    Type Name Description
    TimeSpan position

    The new TimeSpan position.

    Overrides
    AudioSource.SetQueuePlayPosition(TimeSpan)

    SetVolume(float)

    Sets the volume of this source.

    Declaration
    protected override void SetVolume(float volume)
    Parameters
    Type Name Description
    float volume

    The new volume.

    Overrides
    AudioSource.SetVolume(float)

    Implements

    IDisposable

    Extension Methods

    ReflectionHelper.GetMemberAssembly(object)
    ReflectionHelper.GetTypeName(object)
    In This Article
    Back to top
    Generated by DocFX