API reference

MpegFrameDecoder Class

Constructors

MpegFrameDecoder ()
Signature
Meta.Voice.NLayer.MpegFrameDecoder.MpegFrameDecoder()

Properties

StereoMode : StereoMode
[Get][Set]
Stereo mode used in decoding.
Signature
StereoMode Meta.Voice.NLayer.MpegFrameDecoder.StereoMode

Methods

DecodeFrame ( frame , dest , destOffset )
Decode the Mpeg frame into provided buffer. Do exactly the same as DecodeFrame(IMpegFrame, float[], int) except that the data is written in type as byte array, while still representing single-precision float (in local endian).
Signature
int Meta.Voice.NLayer.MpegFrameDecoder.DecodeFrame(IMpegFrame frame, byte[] dest, int destOffset)
Parameters
frame: IMpegFrame  The Mpeg frame to be decoded.
dest: byte []  Destination buffer. Decoded PCM (single-precision floating point array) will be written into it.
destOffset: int  Writing offset on the destination buffer.
Returns
int
DecodeFrame ( frame , dest , destOffset )
Decode the Mpeg frame into provided buffer. Result varies with different StereoMode:
  • For NLayer.StereoMode.Both, sample data on both two channels will occur in turn (left first).
  • For NLayer.StereoMode.LeftOnly and NLayer.StereoMode.RightOnly, only data on specified channel will occur.
  • For NLayer.StereoMode.DownmixToMono, two channels will be down-mixed into single channel.
Signature
int Meta.Voice.NLayer.MpegFrameDecoder.DecodeFrame(IMpegFrame frame, float[] dest, int destOffset)
Parameters
frame: IMpegFrame  The Mpeg frame to be decoded.
dest: float []  Destination buffer. Decoded PCM (single-precision floating point array) will be written into it.
destOffset: int  Writing offset on the destination buffer.
Returns
int
Reset ()
Reset the decoder.
Signature
void Meta.Voice.NLayer.MpegFrameDecoder.Reset()
Returns
void
SetEQ ( eq )
Set the equalizer.
Signature
void Meta.Voice.NLayer.MpegFrameDecoder.SetEQ(float[] eq)
Parameters
eq: float []  The equalizer, represented by an array of 32 adjustments in dB.
Returns
void