C# 클래스 Mp3Sharp.Mp3Stream

Provides a view of the sequence of bytes that are produced during the conversion of an MP3 stream into a 16-bit PCM-encoded ("WAV" format) stream.
상속: Stream
파일 보기 프로젝트 열기: RHY3756547/FreeSO 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
FormatRep SoundFormat

공개 메소드들

메소드 설명
Close ( ) : void

Closes the source stream and releases any associated resources.

DecodeFrames ( int frameCount ) : int

Decodes the requested number of frames from the MP3 stream and caches their PCM-encoded bytes. These can subsequently be obtained using the Read method. Returns the number of frames that were successfully decoded.

Flush ( ) : void
Mp3Stream ( Stream sourceStream ) : System

Creates a new stream instance using the provided stream as a source, and the default chunk size of 4096 bytes.

Mp3Stream ( Stream sourceStream, int chunkSize ) : System

Creates a new stream instance using the provided stream as a source.

Mp3Stream ( string fileName ) : System

Creates a new stream instance using the provided filename, and the default chunk size of 4096 bytes.

Mp3Stream ( string fileName, int chunkSize ) : System

Creates a new stream instance using the provided filename and chunk size.

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

Reads the MP3 stream as PCM-encoded bytes. Decodes a portion of the stream if necessary.

ReadByte ( ) : int

Reads a single byte of the PCM-encoded stream.

Seek ( long pos, SeekOrigin origin ) : long

Sets the position of the source stream.

SetLength ( long len ) : void

This method is not valid for an Mp3Stream.

Write ( byte buf, int ofs, int count ) : void

This method is not valid for an Mp3Stream.

비공개 메소드들

메소드 설명
ReadFrame ( ) : bool

Reads a frame from the MP3 stream. Returns whether the operation was successful. If it wasn't, the source stream is probably at its end.

메소드 상세

Close() 공개 메소드

Closes the source stream and releases any associated resources.
public Close ( ) : void
리턴 void

DecodeFrames() 공개 메소드

Decodes the requested number of frames from the MP3 stream and caches their PCM-encoded bytes. These can subsequently be obtained using the Read method. Returns the number of frames that were successfully decoded.
public DecodeFrames ( int frameCount ) : int
frameCount int
리턴 int

Flush() 공개 메소드

public Flush ( ) : void
리턴 void

Mp3Stream() 공개 메소드

Creates a new stream instance using the provided stream as a source, and the default chunk size of 4096 bytes.
public Mp3Stream ( Stream sourceStream ) : System
sourceStream Stream
리턴 System

Mp3Stream() 공개 메소드

Creates a new stream instance using the provided stream as a source.
public Mp3Stream ( Stream sourceStream, int chunkSize ) : System
sourceStream Stream
chunkSize int
리턴 System

Mp3Stream() 공개 메소드

Creates a new stream instance using the provided filename, and the default chunk size of 4096 bytes.
public Mp3Stream ( string fileName ) : System
fileName string
리턴 System

Mp3Stream() 공개 메소드

Creates a new stream instance using the provided filename and chunk size.
public Mp3Stream ( string fileName, int chunkSize ) : System
fileName string
chunkSize int
리턴 System

Read() 공개 메소드

Reads the MP3 stream as PCM-encoded bytes. Decodes a portion of the stream if necessary.
public Read ( byte buffer, int offset, int count ) : int
buffer byte
offset int
count int
리턴 int

ReadByte() 공개 메소드

Reads a single byte of the PCM-encoded stream.
public ReadByte ( ) : int
리턴 int

Seek() 공개 메소드

Sets the position of the source stream.
public Seek ( long pos, SeekOrigin origin ) : long
pos long
origin SeekOrigin
리턴 long

SetLength() 공개 메소드

This method is not valid for an Mp3Stream.
public SetLength ( long len ) : void
len long
리턴 void

Write() 공개 메소드

This method is not valid for an Mp3Stream.
public Write ( byte buf, int ofs, int count ) : void
buf byte
ofs int
count int
리턴 void

프로퍼티 상세

FormatRep 공개적으로 프로퍼티

public SoundFormat FormatRep
리턴 SoundFormat