C# Class NAudio.Wave.Mp3FileReader

Class for reading from MP3 files
Inheritance: WaveStream
Datei anzeigen Open project: jishi/Jishi.StreamToSonos Class Usage Examples

Public Methods

Method Description
CreateAcmFrameDecompressor ( WaveFormat mp3Format ) : IMp3FrameDecompressor

Creates an ACM MP3 Frame decompressor. This is the default with NAudio

Mp3FileReader ( Stream inputStream ) : System

Opens MP3 from a stream rather than a file Will not dispose of this stream itself

Mp3FileReader ( Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder ) : System

Opens MP3 from a stream rather than a file Will not dispose of this stream itself

Mp3FileReader ( string mp3FileName ) : System

Supports opening a MP3 file

Mp3FileReader ( string mp3FileName, FrameDecompressorBuilder frameDecompressorBuilder ) : System

Supports opening a MP3 file

Read ( byte sampleBuffer, int offset, int numBytes ) : int

Reads decompressed PCM data from our MP3 file.

ReadNextFrame ( ) : NAudio.Wave.Mp3Frame

Reads the next mp3 frame

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Disposes this WaveStream

Private Methods

Method Description
CreateTableOfContents ( ) : void
ReadNextFrame ( bool readData ) : NAudio.Wave.Mp3Frame

Reads the next mp3 frame

TotalSeconds ( ) : double

Gets the total length of this file in milliseconds.

ValidateFrameFormat ( NAudio.Wave.Mp3Frame frame ) : void

Method Details

CreateAcmFrameDecompressor() public static method

Creates an ACM MP3 Frame decompressor. This is the default with NAudio
public static CreateAcmFrameDecompressor ( WaveFormat mp3Format ) : IMp3FrameDecompressor
mp3Format WaveFormat A WaveFormat object based
return IMp3FrameDecompressor

Dispose() protected method

Disposes this WaveStream
protected Dispose ( bool disposing ) : void
disposing bool
return void

Mp3FileReader() public method

Opens MP3 from a stream rather than a file Will not dispose of this stream itself
public Mp3FileReader ( Stream inputStream ) : System
inputStream Stream The incoming stream containing MP3 data
return System

Mp3FileReader() public method

Opens MP3 from a stream rather than a file Will not dispose of this stream itself
public Mp3FileReader ( Stream inputStream, FrameDecompressorBuilder frameDecompressorBuilder ) : System
inputStream Stream The incoming stream containing MP3 data
frameDecompressorBuilder FrameDecompressorBuilder Factory method to build a frame decompressor
return System

Mp3FileReader() public method

Supports opening a MP3 file
public Mp3FileReader ( string mp3FileName ) : System
mp3FileName string
return System

Mp3FileReader() public method

Supports opening a MP3 file
public Mp3FileReader ( string mp3FileName, FrameDecompressorBuilder frameDecompressorBuilder ) : System
mp3FileName string MP3 File name
frameDecompressorBuilder FrameDecompressorBuilder Factory method to build a frame decompressor
return System

Read() public method

Reads decompressed PCM data from our MP3 file.
public Read ( byte sampleBuffer, int offset, int numBytes ) : int
sampleBuffer byte
offset int
numBytes int
return int

ReadNextFrame() public method

Reads the next mp3 frame
public ReadNextFrame ( ) : NAudio.Wave.Mp3Frame
return NAudio.Wave.Mp3Frame