public class DmoMp3Decoder : DmoStream
DirectX Media Object MP3 Decoder wrapper.
DmoMp3Decoder(Stream stream)
Initializes a new instance of the DmoMp3Decoder class.
public void DmoMp3Decoder(Stream stream)
Parameters
stream
StreamStream which contains raw MP3 data.
DmoMp3Decoder(String filename)
Initializes a new instance of the DmoMp3Decoder class.
public void DmoMp3Decoder(String filename)
Parameters
filename
StringFile which contains raw MP3 data.
CreateMediaObject(WaveFormat inputFormat, WaveFormat outputFormat)
Returns a MediaObject to decode the mp3 data.
protected MediaObject CreateMediaObject(WaveFormat inputFormat, WaveFormat outputFormat)
Parameters
inputFormat
WaveFormatFormat of the mp3 data to decode.
outputFormat
WaveFormatOutput format.
Returns
MediaObject to decode the mp3 data.
Dispose(Boolean disposing)
Disposes the DmoMp3Decoder.
protected void Dispose(Boolean disposing)
Parameters
disposing
BooleanTrue to release both managed and unmanaged resources; false to release only unmanaged resources.
GetInputData(Byte[]& inputDataBuffer, Int32 requested)
Gets raw mp3 data to decode.
protected Int32 GetInputData(Byte[]& inputDataBuffer, Int32 requested)
Parameters
inputDataBuffer
Byte[]&Byte array which will hold the raw mp3 data to decode.
requested
Int32Number of requested bytes.
Returns
Total amount of read bytes.
GetInputFormat()
Returns the input format.
protected WaveFormat GetInputFormat()
Returns
Input format.
GetOutputFormat()
Returns the output format.
protected WaveFormat GetOutputFormat()
Returns
Output format.
Read(Byte[] buffer, Int32 offset, Int32 count)
Reads a sequence of bytes from the stream.
public Int32 Read(Byte[] buffer, Int32 offset, Int32 count)
Parameters
buffer
Byte[]An array of bytes. When this method returns, the buffer contains the read bytes.
offset
Int32The zero-based byte offset in buffer at which to begin storing the data read from the stream.
count
Int32The maximum number of bytes to be read from the stream
Returns
The actual number of read bytes.
CanSeek
Gets a value indicating whether the IAudioSource supports seeking.
public override Boolean CanSeek { get; }
Length
Gets the length of the DmoMp3Decoder in bytes.
public override Int64 Length { get; }
Position
Gets or sets the position of the DmoMp3Decoder in bytes.
public override Int64 Position { get; set; }