C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
Device Device
NotificationEvent System.Threading.AutoResetEvent

Открытые методы

Метод Описание
EventRaisingSoundBuffer ( Device device, WaveFormat waveFormat, System.TimeSpan bufferLength ) : System
Play ( ) : void
Stop ( ) : void

Защищенные методы

Метод Описание
InitSecondaryBuffer ( ) : void

Initialize the SecondaryBuffer and Notify instances.

Приватные методы

Метод Описание
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.

Описание методов

EventRaisingSoundBuffer() публичный Метод

public EventRaisingSoundBuffer ( Device device, WaveFormat waveFormat, System.TimeSpan bufferLength ) : System
device Device
waveFormat WaveFormat
bufferLength System.TimeSpan
Результат System

InitSecondaryBuffer() защищенный Метод

Initialize the SecondaryBuffer and Notify instances.
protected InitSecondaryBuffer ( ) : void
Результат void

Play() публичный Метод

public Play ( ) : void
Результат void

Stop() публичный Метод

public Stop ( ) : void
Результат void

Описание свойств

Device защищенное свойство

protected Device Device
Результат Device

NotificationEvent защищенное свойство

protected AutoResetEvent,System.Threading NotificationEvent
Результат System.Threading.AutoResetEvent