Table of Contents

Class WaveRecorder

Namespace
NAudio.Wave
Assembly
NAudio.Core.dll

Utility class to intercept audio from an IWaveProvider and save it to disk

public class WaveRecorder : IWaveProvider, IDisposable
Inheritance
WaveRecorder
Implements
Inherited Members
Extension Methods

Constructors

WaveRecorder(IWaveProvider, string)

Constructs a new WaveRecorder

public WaveRecorder(IWaveProvider source, string destination)

Parameters

source IWaveProvider

The Source Wave Provider

destination string

The location to write the WAV file to

Properties

WaveFormat

The WaveFormat

public WaveFormat WaveFormat { get; }

Property Value

WaveFormat

Methods

Dispose()

Closes the WAV file

public void Dispose()

Read(byte[], int, int)

Read simply returns what the source returns, but writes to disk along the way

public int Read(byte[] buffer, int offset, int count)

Parameters

buffer byte[]
offset int
count int

Returns

int