Table of Contents

Class AsioPlaybackOptions

Namespace
NAudio.Wave
Assembly
NAudio.Asio.dll

Options for configuring an AsioDevice in playback-only mode via InitPlayback(AsioPlaybackOptions).

public sealed class AsioPlaybackOptions
Inheritance
AsioPlaybackOptions
Inherited Members

Properties

AutoStopOnEndOfStream

When true, the device stops and raises Stopped once the source reports end-of-stream. The stop is dispatched off the ASIO callback thread so user handlers may safely dispose the device.

public bool AutoStopOnEndOfStream { get; init; }

Property Value

bool

BufferSize

Requested ASIO buffer size in frames. If null, uses the driver's preferred buffer size.

public int? BufferSize { get; init; }

Property Value

int?

OutputChannels

Physical output channel indices to route the source to. Source channel n plays out of OutputChannels[n]. Must have exactly as many entries as Source.WaveFormat.Channels. If null, defaults to the contiguous range [0, Source.WaveFormat.Channels - 1].

public int[] OutputChannels { get; init; }

Property Value

int[]

Source

Audio source to play. Required. For an ISampleProvider source, use From(ISampleProvider, int[], int?) or call source.ToWaveProvider() yourself.

public IWaveProvider Source { get; init; }

Property Value

IWaveProvider

Methods

From(ISampleProvider, int[], int?)

Convenience constructor that wraps an ISampleProvider via ToWaveProvider().

public static AsioPlaybackOptions From(ISampleProvider source, int[] outputChannels = null, int? bufferSize = null)

Parameters

source ISampleProvider
outputChannels int[]
bufferSize int?

Returns

AsioPlaybackOptions