C# Class Tunez.StreamingPlayer

Wrapper around OutputQueue and AudioFileStream to allow streaming of various filetypes
Inheritance: IStreamingPlayer, IDisposable
Afficher le fichier Open project: alanmcgovern/tunez

Méthodes publiques

Свойство Type Description
outputQueue OutputAudioQueue

Private Properties

Свойство Type Description
AudioPacketDecoded void
AudioPropertyFound void
BeginPlayingAsync Task
CheckStatus void
EmitFinishedEvent void
EnqueueBuffer void
GetOrCreateAudioBuffer AudioBuffer
HandleBufferCompleted void
NeedsBuffer Task
ReportProgressAsync Task
Reset void
TryPause void
TryResume void
WaitForFinished Task
WaitForOutputReady Task

Méthodes publiques

Méthode Description
Dispose ( ) : void
PlayAsync ( Stream stream, IProgress monitor, CancellationToken token ) : Task

Begins playing the audio stroed in the supplied stream

StreamingPlayer ( ) : System

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Cleaning up all the native Resource

Private Methods

Méthode Description
AudioPacketDecoded ( object sender, PacketReceivedEventArgs args ) : void

Saving the decoded Packets to our active Buffer, if the Buffer is full queue it into the OutputQueue and wait until another buffer gets freed up

AudioPropertyFound ( object sender, PropertyFoundEventArgs args ) : void

When a AudioProperty in the fed packets is found this callback is called

BeginPlayingAsync ( Stream stream, IProgress monitor, CancellationTokenSource cts ) : Task
CheckStatus ( AudioFileStreamStatus status ) : void
EmitFinishedEvent ( AudioQueueProperty property ) : void
EnqueueBuffer ( ) : void

Enqueue the active buffer to the OutputQueue

GetOrCreateAudioBuffer ( ) : AudioBuffer
HandleBufferCompleted ( object sender, BufferCompletedEventArgs e ) : void

Is called when a buffer is completly read and can be queued for re-use

NeedsBuffer ( CancellationToken token ) : Task
ReportProgressAsync ( IProgress monitor, CancellationToken token ) : Task
Reset ( ) : void
TryPause ( ) : void
TryResume ( ) : void
WaitForFinished ( CancellationToken token ) : Task
WaitForOutputReady ( CancellationToken token ) : Task

Method Details

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

Cleaning up all the native Resource
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

PlayAsync() public méthode

Begins playing the audio stroed in the supplied stream
public PlayAsync ( Stream stream, IProgress monitor, CancellationToken token ) : Task
stream Stream Stream.
monitor IProgress
token System.Threading.CancellationToken Token.
Résultat Task

StreamingPlayer() public méthode

public StreamingPlayer ( ) : System
Résultat System

Property Details

outputQueue public_oe property

public OutputAudioQueue outputQueue
Résultat OutputAudioQueue