Property | Type | Description | |
---|---|---|---|
FormatRep | SoundFormat |
Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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.
|
public Mp3Stream ( Stream sourceStream ) : System | ||
sourceStream | Stream | |
return | System |
public Mp3Stream ( Stream sourceStream, int chunkSize ) : System | ||
sourceStream | Stream | |
chunkSize | int | |
return | System |
public Mp3Stream ( string fileName ) : System | ||
fileName | string | |
return | System |
public Mp3Stream ( string fileName, int chunkSize ) : System | ||
fileName | string | |
chunkSize | int | |
return | System |
public Read ( byte buffer, int offset, int count ) : int | ||
buffer | byte | |
offset | int | |
count | int | |
return | int |
public Seek ( long pos, SeekOrigin origin ) : long | ||
pos | long | |
origin | SeekOrigin | |
return | long |
public Write ( byte buf, int ofs, int count ) : void | ||
buf | byte | |
ofs | int | |
count | int | |
return | void |