Table of Contents

Class AsioAudioAvailableEventArgs

Namespace
NAudio.Wave
Assembly
NAudio.Asio.dll

Raised when ASIO data has been recorded. It is important to handle this as quickly as possible as it is in the buffer callback

public class AsioAudioAvailableEventArgs : EventArgs
Inheritance
AsioAudioAvailableEventArgs
Inherited Members

Constructors

AsioAudioAvailableEventArgs(nint[], nint[], int, AsioSampleType)

Initialises a new instance of AsioAudioAvailableEventArgs

public AsioAudioAvailableEventArgs(nint[] inputBuffers, nint[] outputBuffers, int samplesPerBuffer, AsioSampleType asioSampleType)

Parameters

inputBuffers nint[]

Pointers to the ASIO buffers for each channel

outputBuffers nint[]

Pointers to the ASIO buffers for each channel

samplesPerBuffer int

Number of samples in each buffer

asioSampleType AsioSampleType

Audio format within each buffer

Properties

AsioSampleType

Audio format within each buffer Most commonly this will be one of, Int32LSB, Int16LSB, Int24LSB or Float32LSB

public AsioSampleType AsioSampleType { get; }

Property Value

AsioSampleType

InputBuffers

Pointer to a buffer per input channel

public nint[] InputBuffers { get; }

Property Value

nint[]

OutputBuffers

Pointer to a buffer per output channel Allows you to write directly to the output buffers If you do so, set SamplesPerBuffer = true, and make sure all buffers are written to with valid data

public nint[] OutputBuffers { get; }

Property Value

nint[]

SamplesPerBuffer

Number of samples in each buffer

public int SamplesPerBuffer { get; }

Property Value

int

WrittenToOutputBuffers

Set to true if you have written to the output buffers If so, AsioOut will not read from its source

public bool WrittenToOutputBuffers { get; set; }

Property Value

bool

Methods

GetAsInterleavedSamples(float[])

Converts all the recorded audio into a buffer of 32 bit floating point samples, interleaved by channel

public int GetAsInterleavedSamples(float[] samples)

Parameters

samples float[]

Returns

int

Number of samples written (i.e. SamplesPerBuffer * channel count)