Class StreamedBufferSound
Sound streamed buffer
public sealed class StreamedBufferSound : SoundBase, IDisposable, IComponent, IReferencable, ICollectorHolder, IMediaExtractor, IMediaReader
- Inheritance
-
StreamedBufferSound
- Implements
- Inherited Members
- Extension Methods
Remarks
The sound comes from an external process (such like a video decoder, ...) streaming the audio data into a buffer
Constructors
StreamedBufferSound(AudioEngine, MediaSynchronizer, string, long, long, bool)
public StreamedBufferSound(AudioEngine engine, MediaSynchronizer scheduler, string mediaDataUrl, long startPosition, long length, bool spatialized)
Parameters
engine
AudioEnginescheduler
MediaSynchronizermediaDataUrl
stringstartPosition
longlength
longspatialized
bool
Properties
MediaCurrentTime
Gets the current presentation time of the media
public TimeSpan MediaCurrentTime { get; }
Property Value
MediaDuration
Returns the total duration of the media
public TimeSpan MediaDuration { get; }
Property Value
MediaType
Returns the type of media that is extracted
public MediaType MediaType { get; }
Property Value
SpeedFactor
Set the play speed of the media
public float SpeedFactor { get; set; }
Property Value
Methods
CreateInstance(AudioListener, bool, float, 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 = 0, HrtfEnvironment environment = HrtfEnvironment.Small)
Parameters
listener
AudioListeneruseHrtf
booldirectionalFactor
floatenvironment
HrtfEnvironment
Returns
- SoundInstance
A new sound instance
Exceptions
- ObjectDisposedException
The sound has already been disposed
ReachedEndOfMedia()
Specifies if the end of the media has been reached.
public bool ReachedEndOfMedia()
Returns
Seek(TimeSpan)
Seek to provided position in the media source.
public void Seek(TimeSpan mediaTime)
Parameters
mediaTime
TimeSpan
SeekRequestCompleted()
Indicate if a previous seek request has been completed.
public bool SeekRequestCompleted()