Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    StreamedBufferSoundSource Class

    Namespace: Stride.Audio
    Assembly: Stride.Audio.dll
    System.Object → DynamicSoundSource → StreamedBufferSoundSource
    Derived from StreamedBufferSoundSource:

    public class StreamedBufferSoundSource : DynamicSoundSource, IDisposable, IMediaExtractor, IMediaReader
    Name Description
    Constructors
    StreamedBufferSoundSource(SoundInstanceStreamedBuffer, MediaSynchronizer, String, Int64, Int64)
    Properties
    CanFill
    Channels
    IsDisposed
    MaxNumberOfBuffers
    MediaCurrentTime
    MediaDuration
    MediaType
    PlayRange

    Gets or sets the region of time to play from the audio clip.

    SampleRate
    SpeedFactor
    Methods
    DisposeInternal()
    ExtractAndFillData()
    InitializeInternal()
    PrepareInternal()
    ReachedEndOfMedia()
    Seek(TimeSpan)
    SeekInternal()

    Should be called from working thread only (or add proper locks)

    SeekRequestCompleted()
    SetLooped(Boolean)

    Sets if the stream should be played in loop

    UpdateInternal()
    | Improve this Doc View Source

    Constructors


    StreamedBufferSoundSource(SoundInstanceStreamedBuffer, MediaSynchronizer, String, Int64, Int64)

    public StreamedBufferSoundSource(SoundInstanceStreamedBuffer instance, MediaSynchronizer synchronizer, string mediaDataUrl, long startPosition, long length)
    Parameters
    Type Name Description
    SoundInstanceStreamedBuffer instance
    MediaSynchronizer synchronizer
    System.String mediaDataUrl
    System.Int64 startPosition
    System.Int64 length
    | Improve this Doc View Source

    Properties


    CanFill

    protected override bool CanFill { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    DynamicSoundSource.CanFill

    Channels

    public int Channels { get; }
    Property Value
    Type Description
    System.Int32

    IsDisposed

    public bool IsDisposed { get; }
    Property Value
    Type Description
    System.Boolean

    MaxNumberOfBuffers

    public override int MaxNumberOfBuffers { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    DynamicSoundSource.MaxNumberOfBuffers

    MediaCurrentTime

    public TimeSpan MediaCurrentTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    MediaDuration

    public TimeSpan MediaDuration { get; }
    Property Value
    Type Description
    System.TimeSpan

    MediaType

    public MediaType MediaType { get; }
    Property Value
    Type Description
    MediaType

    PlayRange

    Gets or sets the region of time to play from the audio clip.

    public override PlayRange PlayRange { get; set; }
    Property Value
    Type Description
    PlayRange
    Overrides
    DynamicSoundSource.PlayRange

    SampleRate

    public int SampleRate { get; }
    Property Value
    Type Description
    System.Int32

    SpeedFactor

    public float SpeedFactor { get; set; }
    Property Value
    Type Description
    System.Single
    | Improve this Doc View Source

    Methods


    DisposeInternal()

    protected override void DisposeInternal()
    Overrides
    DynamicSoundSource.DisposeInternal()

    ExtractAndFillData()

    protected override void ExtractAndFillData()
    Overrides
    DynamicSoundSource.ExtractAndFillData()

    InitializeInternal()

    protected override void InitializeInternal()
    Overrides
    DynamicSoundSource.InitializeInternal()

    PrepareInternal()

    protected override void PrepareInternal()
    Overrides
    DynamicSoundSource.PrepareInternal()

    ReachedEndOfMedia()

    public bool ReachedEndOfMedia()
    Returns
    Type Description
    System.Boolean

    Seek(TimeSpan)

    public void Seek(TimeSpan mediaTime)
    Parameters
    Type Name Description
    System.TimeSpan mediaTime

    SeekInternal()

    Should be called from working thread only (or add proper locks)

    protected override void SeekInternal()
    Overrides
    DynamicSoundSource.SeekInternal()

    SeekRequestCompleted()

    public bool SeekRequestCompleted()
    Returns
    Type Description
    System.Boolean

    SetLooped(Boolean)

    Sets if the stream should be played in loop

    public override void SetLooped(bool loop)
    Parameters
    Type Name Description
    System.Boolean loop

    if looped or not

    Overrides
    DynamicSoundSource.SetLooped(Boolean)

    UpdateInternal()

    protected override void UpdateInternal()
    Overrides
    DynamicSoundSource.UpdateInternal()

    Inherited Members

    DynamicSoundSource.Logger
    DynamicSoundSource.NewSources
    DynamicSoundSource.Sources
    DynamicSoundSource.Commands
    DynamicSoundSource.ReadyToPlay
    DynamicSoundSource.Ended
    DynamicSoundSource.deviceBuffers
    DynamicSoundSource.freeBuffers
    DynamicSoundSource.soundInstance
    DynamicSoundSource.isInitialized
    DynamicSoundSource.isDisposed
    DynamicSoundSource.state
    DynamicSoundSource.playingQueued
    DynamicSoundSource.Dispose()
    DynamicSoundSource.Play()
    DynamicSoundSource.Pause()
    DynamicSoundSource.Stop()
    DynamicSoundSource.IsPausedOrPlaying
    DynamicSoundSource.RestartInternal()
    DynamicSoundSource.PlayInternal()
    DynamicSoundSource.PauseInternal()
    DynamicSoundSource.StopInternal(Boolean)
    DynamicSoundSource.FillBuffer(IntPtr, Int32, AudioLayer.BufferType)
    DynamicSoundSource.FillBuffer(Int16[], Int32, AudioLayer.BufferType)
    DynamicSoundSource.FillBuffer(Byte[], Int32, AudioLayer.BufferType)

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation