Class RiffWriter
Writes audio data into a stream following the RIFF/WAV format.
public sealed class RiffWriter : IDisposable
- Inheritance
-
RiffWriter
- Implements
- Inherited Members
Constructors
RiffWriter(Stream, int, int, int)
Initializes a new instance of the RiffWriter class using the specified stream, number of channels, sample rate and bits per sample.
public RiffWriter(Stream stream, int channels, int samplesPerSecond, int bitsPerSample)
Parameters
stream
StreamThe output stream.
channels
intThe number of audio channels.
samplesPerSecond
intThe playback sample frequency, in samples per second.
bitsPerSample
intThe number of bits per audio sample.
Methods
Close()
Closes the current RiffWriter and the underlying stream.
public void Close()
Write(byte[])
Writes an array containing raw audio data into the WAV stream.
public void Write(byte[] buffer)