Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    StreamedBufferSound Class

    Namespace: Stride.Audio
    Assembly: Stride.Audio.dll

    Sound streamed buffer

    System.Object → DisposeBase → ComponentBase → SoundBase → StreamedBufferSound
    Derived from StreamedBufferSound:

    public sealed class StreamedBufferSound : SoundBase, IDisposable, IComponent, IReferencable, ICollectorHolder, IMediaExtractor, IMediaReader
    Remarks

    The sound comes from an external process (such like a video decoder, ...) streaming the audio data into a buffer

    Name Description
    Constructors
    StreamedBufferSound(AudioEngine, MediaSynchronizer, String, Int64, Int64, Boolean)
    Properties
    MediaCurrentTime
    MediaDuration
    MediaType
    SpeedFactor
    Methods
    CreateInstance(AudioListener, Boolean, Single, HrtfEnvironment)

    Create a new sound effect instance of the sound effect. Each instance that can be played and localized independently from others.

    ReachedEndOfMedia()
    Seek(TimeSpan)
    SeekRequestCompleted()
    | Improve this Doc View Source

    Constructors


    StreamedBufferSound(AudioEngine, MediaSynchronizer, String, Int64, Int64, Boolean)

    public StreamedBufferSound(AudioEngine engine, MediaSynchronizer scheduler, string mediaDataUrl, long startPosition, long length, bool spatialized)
    Parameters
    Type Name Description
    AudioEngine engine
    MediaSynchronizer scheduler
    System.String mediaDataUrl
    System.Int64 startPosition
    System.Int64 length
    System.Boolean spatialized
    | Improve this Doc View Source

    Properties


    MediaCurrentTime

    public TimeSpan MediaCurrentTime { get; }
    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

    SpeedFactor

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

    Methods


    CreateInstance(AudioListener, Boolean, Single, HrtfEnvironment)

    Create a new sound effect instance of the sound effect. Each instance that can be played and localized independently from others.

    public override SoundInstance CreateInstance(AudioListener listener = null, bool useHrtf = false, float directionalFactor = 0F, HrtfEnvironment environment = HrtfEnvironment.Small)
    Parameters
    Type Name Description
    AudioListener listener
    System.Boolean useHrtf
    System.Single directionalFactor
    HrtfEnvironment environment
    Returns
    Type Description
    SoundInstance

    A new sound instance

    Overrides
    SoundBase.CreateInstance(AudioListener, Boolean, Single, HrtfEnvironment)
    Exceptions
    Type Condition
    System.ObjectDisposedException

    The sound has already been disposed


    ReachedEndOfMedia()

    public bool ReachedEndOfMedia()
    Returns
    Type Description
    System.Boolean

    Seek(TimeSpan)

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

    SeekRequestCompleted()

    public bool SeekRequestCompleted()
    Returns
    Type Description
    System.Boolean

    Inherited Members

    SoundBase.TotalLength
    SoundBase.GetCountChannels()
    SoundBase.RegisterInstance(SoundInstance)
    SoundBase.intancesCreationCount
    SoundBase.Destroy()
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    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