Class AsioAudioAvailableEventArgs
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
inputBuffersnint[]Pointers to the ASIO buffers for each channel
outputBuffersnint[]Pointers to the ASIO buffers for each channel
samplesPerBufferintNumber of samples in each buffer
asioSampleTypeAsioSampleTypeAudio 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
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
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
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
samplesfloat[]
Returns
- int
Number of samples written (i.e. SamplesPerBuffer * channel count)