C# Класс NAudio.Wave.Mp3FileReader

Class for reading from MP3 files
Наследование: WaveStream
Показать файл Открыть проект Примеры использования класса

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

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

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

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

Disposes this WaveStream

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

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

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

CreateAcmFrameDecompressor() публичный статический Метод

Creates an ACM MP3 Frame decompressor. This is the default with NAudio
public static CreateAcmFrameDecompressor ( WaveFormat mp3Format ) : IMp3FrameDecompressor
mp3Format WaveFormat A WaveFormat object based
Результат IMp3FrameDecompressor

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

Disposes this WaveStream
protected Dispose ( bool disposing ) : void
disposing bool
Результат void

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

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
Результат System

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

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
Результат System

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

Supports opening a MP3 file
public Mp3FileReader ( string mp3FileName ) : System
mp3FileName string
Результат System

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

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
Результат System

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

Reads decompressed PCM data from our MP3 file.
public Read ( byte sampleBuffer, int offset, int numBytes ) : int
sampleBuffer byte
offset int
numBytes int
Результат int

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

Reads the next mp3 frame
public ReadNextFrame ( ) : NAudio.Wave.Mp3Frame
Результат NAudio.Wave.Mp3Frame