API reference
API reference
Select your platform
No SDKs available
No versions available

MpegFile Class

Extends IDisposable

Properties

Sample rate of source Mpeg, in Hertz.
Channel count of source Mpeg.
Whether the Mpeg stream supports seek operation.
Data length of decoded data, in PCM.
Media duration of the Mpeg file.
Current decode position, in number of sample. Calling the setter will result in a seeking operation.
Current decode position, represented by time. Calling the setter will result in a seeking operation.
Stereo mode used in decoding.

Member Functions

Construct Mpeg file representation from filename.
Parameters
fileName
The file which contains Mpeg data.
Construct Mpeg file representation from stream.
Parameters
stream
The input stream which contains Mpeg data.
Implements IDisposable.Dispose.
Set the equalizer.
Parameters
eq
The equalizer, represented by an array of 32 adjustments in dB.
Read specified samples into provided buffer. Do exactly the same as ReadSamples(float[], int, int) except that the data is written in type of byte, while still representing single-precision float (in local endian).
Parameters
buffer
Buffer to write. Floating point data will be actually written into this byte array.
index
Writing offset on the destination buffer.
count
Length of samples to be read, in bytes.
Returns
Sample size actually reads, in bytes.
Read specified samples into provided buffer, as PCM format. Result varies with diffirent StereoMode:
Parameters
buffer
Buffer to write.
index
Writing offset on the destination buffer.
count
Count of samples to be read.
Returns
Sample count actually reads.
int ReadSamplesInt16
( byte [] buffer,
int index,
int count )
int ReadSamplesInt8
( byte [] buffer,
int index,
int count )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon