C# Class NAudio.Wave.Mp3FileReader

Class for reading from MP3 files
Inheritance: WaveStream
Afficher le fichier Open project: jishi/Jishi.StreamToSonos Class Usage Examples

Méthodes publiques

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

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Disposes this WaveStream

Private Methods

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

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

Dispose() protected méthode

Disposes this WaveStream
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

Mp3FileReader() public méthode

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

Mp3FileReader() public méthode

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

Mp3FileReader() public méthode

Supports opening a MP3 file
public Mp3FileReader ( string mp3FileName ) : System
mp3FileName string
Résultat System

Mp3FileReader() public méthode

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

Read() public méthode

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

ReadNextFrame() public méthode

Reads the next mp3 frame
public ReadNextFrame ( ) : NAudio.Wave.Mp3Frame
Résultat NAudio.Wave.Mp3Frame