public class DmoResampler : WaveAggregatorBase
Resampler based on the DmoResampler. Supported since Windows XP.
DmoResampler(IWaveSource source, WaveFormat outputFormat)
Initializes a new instance of the DmoResampler class.
public void DmoResampler(IWaveSource source, WaveFormat outputFormat)
Parameters
source
IWaveSourceIWaveSource which has to get resampled.
outputFormat
WaveFormatWaveformat, which specifies the new format. Note, that by far not all formats are supported.
DmoResampler(IWaveSource source, Int32 destinationSampleRate)
Initializes a new instance of the DmoResampler class.
public void DmoResampler(IWaveSource source, Int32 destinationSampleRate)
Parameters
source
IWaveSourceIWaveSource which has to get resampled.
destinationSampleRate
Int32The new output samplerate specified in Hz.
Dispose(Boolean disposing)
Disposes the DmoResampler.
DisposeResamplerOnly()
Disposes the allocated resources of the resampler but does not dispose the underlying source.
public void DisposeResamplerOnly()
Read(Byte[] buffer, Int32 offset, Int32 count)
Reads a resampled sequence of bytes from the DmoResampler and advances the position within the stream by the number of bytes read.
public Int32 Read(Byte[] buffer, Int32 offset, Int32 count)
Parameters
buffer
Byte[]An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.
offset
Int32The zero-based byte offset in the buffer at which to begin storing the data read from the current stream.
count
Int32The maximum number of bytes to read from the current source.
Returns
The total number of bytes read into the buffer.
Length
Gets the length of the source.
public override Int64 Length { get; }
Position
Gets or sets the position of the source.
public override Int64 Position { get; set; }
Quality
Specifies the quality of the output. The valid range is from 1 to 60.
public Int32 Quality { get; set; }
WaveFormat
Gets the new output format.
public override WaveFormat WaveFormat { get; }