Show / Hide Table of Contents

    Interface IAudioSource

    Provides information and notifies changes from an audio source and exposes playback controls.

    Namespace: AudioBand.AudioSource
    Assembly: AudioBand.AudioSource.dll
    Syntax
    [InheritedExport(typeof(IAudioSource))]
    public interface IAudioSource

    Properties

    | Improve this Doc View Source

    Logger

    Gets or sets the IAudioSourceLogger used for logging.

    Declaration
    IAudioSourceLogger Logger { get; set; }
    Property Value
    Type Description
    IAudioSourceLogger

    Audio source logger that will be injected.

    | Improve this Doc View Source

    Name

    Gets the name of the audio source.

    Declaration
    string Name { get; }
    Property Value
    Type Description
    String

    The name of the audio source.

    Methods

    | Improve this Doc View Source

    ActivateAsync()

    Called when the audio source becomes active.

    Declaration
    Task ActivateAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous activate operation.

    | Improve this Doc View Source

    DeactivateAsync()

    Called when the audio source is no longer active.

    Declaration
    Task DeactivateAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous deactivate operation.

    | Improve this Doc View Source

    NextTrackAsync()

    Called when there is a request to skip to the next track.

    Declaration
    Task NextTrackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous skip to next track operation.

    | Improve this Doc View Source

    PauseTrackAsync()

    Called when there is a request to stop playback.

    Declaration
    Task PauseTrackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous pause operation.

    | Improve this Doc View Source

    PlayTrackAsync()

    Called when there is a request to start playback.

    Declaration
    Task PlayTrackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous play operation.

    | Improve this Doc View Source

    PreviousTrackAsync()

    Called when there is a request to skip to the previous track.

    Declaration
    Task PreviousTrackAsync()
    Returns
    Type Description
    Task

    A Task representing the asynchronous skip to previous track operation.

    | Improve this Doc View Source

    SetPlaybackProgressAsync(TimeSpan)

    Called when there is a request to change to current playback progress.

    Declaration
    Task SetPlaybackProgressAsync(TimeSpan newProgress)
    Parameters
    Type Name Description
    TimeSpan newProgress

    The new time to seek to.

    Returns
    Type Description
    Task

    A Task representing the asynchronous set playback progress operation.

    | Improve this Doc View Source

    SetRepeatModeAsync(RepeatMode)

    Called when there is a request to change the repeat mode.

    Declaration
    Task SetRepeatModeAsync(RepeatMode newRepeatMode)
    Parameters
    Type Name Description
    RepeatMode newRepeatMode

    The new RepeatMode.

    Returns
    Type Description
    Task

    A Task representing the asynchronous set repeat mode operation.

    | Improve this Doc View Source

    SetShuffleAsync(Boolean)

    Called when there is a request to change the shuffle state.

    Declaration
    Task SetShuffleAsync(bool shuffleOn)
    Parameters
    Type Name Description
    Boolean shuffleOn

    The new shuffle state, true if shuffle should be on; false otherwise.

    Returns
    Type Description
    Task

    A Task representing the asynchronous set shuffle operation.

    | Improve this Doc View Source

    SetVolumeAsync(Single)

    Called when there is a request to change the volume.

    Declaration
    Task SetVolumeAsync(float newVolume)
    Parameters
    Type Name Description
    Single newVolume

    The new volume to set. The range is between 0.0 and 1.0 inclusive.

    Returns
    Type Description
    Task

    A Task representing the asynchronous set volume operation.

    Events

    | Improve this Doc View Source

    IsPlayingChanged

    Occurs when the track play state has changed. true if playing; false otherwise;

    Declaration
    event EventHandler<bool> IsPlayingChanged
    Event Type
    Type Description
    EventHandler<Boolean>
    | Improve this Doc View Source

    RepeatModeChanged

    Occurs when the repeat mode changes.

    Declaration
    event EventHandler<RepeatMode> RepeatModeChanged
    Event Type
    Type Description
    EventHandler<RepeatMode>
    | Improve this Doc View Source

    SettingChanged

    Occurs when a setting has changed internally.

    Declaration
    event EventHandler<SettingChangedEventArgs> SettingChanged
    Event Type
    Type Description
    EventHandler<SettingChangedEventArgs>
    | Improve this Doc View Source

    ShuffleChanged

    Occurs when the shuffle state changes. true if shuffle is on; false otherwise;

    Declaration
    event EventHandler<bool> ShuffleChanged
    Event Type
    Type Description
    EventHandler<Boolean>
    | Improve this Doc View Source

    TrackInfoChanged

    Occurs when track information has changed.

    Declaration
    event EventHandler<TrackInfoChangedEventArgs> TrackInfoChanged
    Event Type
    Type Description
    EventHandler<TrackInfoChangedEventArgs>
    | Improve this Doc View Source

    TrackProgressChanged

    Occurs when the current track progress has changed.

    Declaration
    event EventHandler<TimeSpan> TrackProgressChanged
    Event Type
    Type Description
    EventHandler<TimeSpan>
    | Improve this Doc View Source

    VolumeChanged

    Occurs when the volume of the audio source changes. The range of the volume is between 0.0 and 1.0 inclusive.

    Declaration
    event EventHandler<float> VolumeChanged
    Event Type
    Type Description
    EventHandler<Single>
    • Improve this Doc
    • View Source
    Back to top Generated by DocFX