C# Class Mp3Sharp.EventRaisingSoundBuffer

Component representing a secondary buffer that can be used for streaming. The buffer raises events when it reaches its half-way mark, as well as its end.
Afficher le fichier Open project: RHY3756547/FreeSO Class Usage Examples

Protected Properties

Свойство Type Description
Device Device
NotificationEvent System.Threading.AutoResetEvent

Méthodes publiques

Méthode Description
EventRaisingSoundBuffer ( Device device, WaveFormat waveFormat, System.TimeSpan bufferLength ) : System
Play ( ) : void
Stop ( ) : void

Méthodes protégées

Méthode Description
InitSecondaryBuffer ( ) : void

Initialize the SecondaryBuffer and Notify instances.

Private Methods

Méthode Description
GetBytesByRaisingEvent ( int locationInSecondaryBuffer, int numBytesToAcquire, BufferNotificationEventArgs e ) : void
HandleNewBytesInControlThread ( int nextPlaceForBytes, int byteWindowSize, BufferNotificationEventArgs ea ) : NextNotificationTask
StreamControlThread ( ) : void

The stream control thread raises events every half the stream. When the BufferNotificationEventArgs contains a SoundFinished property set to true, the current buffer segment is padded with silence. At the next notification, the next buffer segment is filled with silence, and no event is raised. At the next notification, which will come when the padded segment (not the completely silent segment) is finished, the SecondaryBuffer is stopped and the thread terminated.

Method Details

EventRaisingSoundBuffer() public méthode

public EventRaisingSoundBuffer ( Device device, WaveFormat waveFormat, System.TimeSpan bufferLength ) : System
device Device
waveFormat WaveFormat
bufferLength System.TimeSpan
Résultat System

InitSecondaryBuffer() protected méthode

Initialize the SecondaryBuffer and Notify instances.
protected InitSecondaryBuffer ( ) : void
Résultat void

Play() public méthode

public Play ( ) : void
Résultat void

Stop() public méthode

public Stop ( ) : void
Résultat void

Property Details

Device protected_oe property

protected Device Device
Résultat Device

NotificationEvent protected_oe property

protected AutoResetEvent,System.Threading NotificationEvent
Résultat System.Threading.AutoResetEvent