C# Class NAudio.Lame.LameMP3FileWriter

MP3 encoding class, uses libmp3lame DLL to encode.
Inheritance: Stream
Afficher le fichier Open project: ImagineLearning/NAudio.Lame Class Usage Examples

Protected Properties

Свойство Type Description
outBuffer byte[]

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
Dispose ( bool final ) : void

Dispose of object

Private Methods

Méthode Description
Encode ( ) : void
encode_float_mono ( ) : int
encode_float_stereo ( ) : int
encode_pcm_16_mono ( ) : int
encode_pcm_16_stereo ( ) : int

Method Details

Dispose() protected méthode

Dispose of object
protected Dispose ( bool final ) : void
final bool True if called from destructor, false otherwise
Résultat void

Flush() public méthode

Finalise compression, add final output to output stream and close encoder
public Flush ( ) : void
Résultat void

GetLameInstance() public méthode

Get internal LAME library instance
public GetLameInstance ( ) : LibMp3Lame
Résultat LibMp3Lame

LameMP3FileWriter() public méthode

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
Résultat System

LameMP3FileWriter() public méthode

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
Résultat System

LameMP3FileWriter() public méthode

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
Résultat System

LameMP3FileWriter() public méthode

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
Résultat System

Read() public méthode

Reading not supported. Throws NotImplementedException.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
Résultat int

Seek() public méthode

Seeking not supported. Throws NotImplementedException.
public Seek ( long offset, SeekOrigin origin ) : long
offset long Seek offset
origin SeekOrigin Seek origin
Résultat long

SetLength() public méthode

Setting length not supported. Throws NotImplementedException.
public SetLength ( long value ) : void
value long Length value
Résultat void

Write() public méthode

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
Résultat void

Property Details

outBuffer protected_oe property

Output buffer, size determined by call to Lame.beInitStream
protected byte[] outBuffer
Résultat byte[]