C# Класс NAudio.Lame.LameMP3FileWriter

MP3 encoding class, uses libmp3lame DLL to encode.
Наследование: Stream
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
outBuffer byte[]

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

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

Finalise compression, add final output to output stream and close encoder

GetLameInstance ( ) : LibMp3Lame

Get internal LAME library instance

LameMP3FileWriter ( Stream outStream, WaveFormat format, LAMEPreset quality ) : System

Create MP3FileWriter to write to supplied stream

LameMP3FileWriter ( Stream outStream, WaveFormat format, int bitRate ) : System

Create MP3FileWriter to write to supplied stream

LameMP3FileWriter ( string outFileName, WaveFormat format, LAMEPreset quality ) : System

Create MP3FileWriter to write to a file on disk

LameMP3FileWriter ( string outFileName, WaveFormat format, int bitRate ) : System

Create MP3FileWriter to write to a file on disk

Read ( byte buffer, int offset, int count ) : int

Reading not supported. Throws NotImplementedException.

Seek ( long offset, SeekOrigin origin ) : long

Seeking not supported. Throws NotImplementedException.

SetLength ( long value ) : void

Setting length not supported. Throws NotImplementedException.

Write ( byte buffer, int offset, int count ) : void

Add data to output buffer, sending to encoder when buffer full

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

Метод Описание
Dispose ( bool final ) : void

Dispose of object

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

Метод Описание
Encode ( ) : void
encode_float_mono ( ) : int
encode_float_stereo ( ) : int
encode_pcm_16_mono ( ) : int
encode_pcm_16_stereo ( ) : int

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

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

Dispose of object
protected Dispose ( bool final ) : void
final bool True if called from destructor, false otherwise
Результат void

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

Finalise compression, add final output to output stream and close encoder
public Flush ( ) : void
Результат void

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

Get internal LAME library instance
public GetLameInstance ( ) : LibMp3Lame
Результат LibMp3Lame

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

Create MP3FileWriter to write to supplied stream
public LameMP3FileWriter ( Stream outStream, WaveFormat format, LAMEPreset quality ) : System
outStream Stream Stream to write encoded data to
format NAudio.Wave.WaveFormat Input WaveFormat
quality LAMEPreset LAME quality preset
Результат System

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

Create MP3FileWriter to write to supplied stream
public LameMP3FileWriter ( Stream outStream, WaveFormat format, int bitRate ) : System
outStream Stream Stream to write encoded data to
format NAudio.Wave.WaveFormat Input WaveFormat
bitRate int Output bit rate in kbps
Результат System

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

Create MP3FileWriter to write to a file on disk
public LameMP3FileWriter ( string outFileName, WaveFormat format, LAMEPreset quality ) : System
outFileName string Name of file to create
format NAudio.Wave.WaveFormat Input WaveFormat
quality LAMEPreset LAME quality preset
Результат System

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

Create MP3FileWriter to write to a file on disk
public LameMP3FileWriter ( string outFileName, WaveFormat format, int bitRate ) : System
outFileName string Name of file to create
format NAudio.Wave.WaveFormat Input WaveFormat
bitRate int Output bit rate in kbps
Результат System

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

Reading not supported. Throws NotImplementedException.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Результат int

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

Seeking not supported. Throws NotImplementedException.
public Seek ( long offset, SeekOrigin origin ) : long
offset long Seek offset
origin SeekOrigin Seek origin
Результат long

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

Setting length not supported. Throws NotImplementedException.
public SetLength ( long value ) : void
value long Length value
Результат void

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

Add data to output buffer, sending to encoder when buffer full
public Write ( byte buffer, int offset, int count ) : void
buffer byte Source buffer
offset int Offset of data in buffer
count int Length of data
Результат void

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

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

Output buffer, size determined by call to Lame.beInitStream
protected byte[] outBuffer
Результат byte[]