Class StreamedBufferSoundSource
public class StreamedBufferSoundSource : DynamicSoundSource, IDisposable, IMediaExtractor, IMediaReader
- Inheritance
-
StreamedBufferSoundSource
- Implements
- Inherited Members
- Extension Methods
Constructors
StreamedBufferSoundSource(SoundInstanceStreamedBuffer, MediaSynchronizer, string, long, long)
public StreamedBufferSoundSource(SoundInstanceStreamedBuffer instance, MediaSynchronizer synchronizer, string mediaDataUrl, long startPosition, long length)
Parameters
instance
SoundInstanceStreamedBuffersynchronizer
MediaSynchronizermediaDataUrl
stringstartPosition
longlength
long
Properties
CanFill
Checks if a buffer can be filled, before calling FillBuffer this should be checked.
protected override bool CanFill { get; }
Property Value
Channels
public int Channels { get; }
Property Value
IsDisposed
Specifies if the extractor has been disposed
public bool IsDisposed { get; }
Property Value
MaxNumberOfBuffers
Max number of buffers that are going to be queued.
public override int MaxNumberOfBuffers { get; }
Property Value
MediaCurrentTime
Gets the current presentation time of the media
public TimeSpan MediaCurrentTime { get; set; }
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
PlayRange
Gets or sets the region of time to play from the audio clip.
public override PlayRange PlayRange { get; set; }
Property Value
SampleRate
public int SampleRate { get; }
Property Value
SpeedFactor
Set the play speed of the media
public float SpeedFactor { get; set; }
Property Value
Methods
DisposeInternal()
Destroys the instance.
protected override void DisposeInternal()
ExtractAndFillData()
protected override void ExtractAndFillData()
InitializeInternal()
protected override void InitializeInternal()
PrepareInternal()
Prepare the source for playback
protected override void PrepareInternal()
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
SeekInternal()
Should be called from working thread only (or add proper locks)
protected override void SeekInternal()
SeekRequestCompleted()
Indicate if a previous seek request has been completed.
public bool SeekRequestCompleted()
Returns
SetLooped(bool)
Sets if the stream should be played in loop
public override void SetLooped(bool loop)
Parameters
loop
boolif looped or not
UpdateInternal()
Update the sound source
protected override void UpdateInternal()