Xeno-rat
Loading...
Searching...
No Matches
NAudio.Wave.AsioAudioAvailableEventArgs Class Reference

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

Inheritance diagram for NAudio.Wave.AsioAudioAvailableEventArgs:
Collaboration diagram for NAudio.Wave.AsioAudioAvailableEventArgs:

Public Member Functions

 AsioAudioAvailableEventArgs (IntPtr[] inputBuffers, IntPtr[] outputBuffers, int samplesPerBuffer, AsioSampleType asioSampleType)
 Initialises a new instance of AsioAudioAvailableEventArgs.
 
int GetAsInterleavedSamples (float[] samples)
 Returns the input buffers as interleaved samples.
 
float[] GetAsInterleavedSamples ()
 Gets as interleaved samples, allocating a float array.
 

Properties

IntPtr[] InputBuffers [get, private set]
 Pointer to a buffer per input channel.
 
IntPtr[] OutputBuffers [get, private set]
 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.
 
bool WrittenToOutputBuffers [get, set]
 Set to true if you have written to the output buffers If so, AsioOut will not read from its source.
 
int SamplesPerBuffer [get, private set]
 Number of samples in each buffer.
 
AsioSampleType AsioSampleType [get, private set]
 Audio format within each buffer Most commonly this will be one of, Int32LSB, Int16LSB, Int24LSB or Float32LSB.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ AsioAudioAvailableEventArgs()

NAudio.Wave.AsioAudioAvailableEventArgs.AsioAudioAvailableEventArgs ( IntPtr[] inputBuffers,
IntPtr[] outputBuffers,
int samplesPerBuffer,
AsioSampleType asioSampleType )
inline

Initialises a new instance of AsioAudioAvailableEventArgs.

Parameters
inputBuffersPointers to the ASIO buffers for each channel
outputBuffersPointers to the ASIO buffers for each channel
samplesPerBufferNumber of samples in each buffer
asioSampleTypeAudio format within each buffer

Member Function Documentation

◆ GetAsInterleavedSamples() [1/2]

float[] NAudio.Wave.AsioAudioAvailableEventArgs.GetAsInterleavedSamples ( )
inline

Gets as interleaved samples, allocating a float array.

Returns
The samples as 32 bit floating point values
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAsInterleavedSamples() [2/2]

int NAudio.Wave.AsioAudioAvailableEventArgs.GetAsInterleavedSamples ( float[] samples)
inline

Returns the input buffers as interleaved samples.

Returns
An array of interleaved samples.

This method retrieves the input buffers as interleaved samples and returns them as an array. It is recommended to use the overload that takes an array and reuses the same one for better performance.

Exceptions
InvalidOperationExceptionThrown when the input buffers are not available.

Property Documentation

◆ AsioSampleType

AsioSampleType NAudio.Wave.AsioAudioAvailableEventArgs.AsioSampleType
getprivate set

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

◆ InputBuffers

IntPtr [] NAudio.Wave.AsioAudioAvailableEventArgs.InputBuffers
getprivate set

Pointer to a buffer per input channel.

◆ OutputBuffers

IntPtr [] NAudio.Wave.AsioAudioAvailableEventArgs.OutputBuffers
getprivate set

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.

◆ SamplesPerBuffer

int NAudio.Wave.AsioAudioAvailableEventArgs.SamplesPerBuffer
getprivate set

Number of samples in each buffer.

◆ WrittenToOutputBuffers

bool NAudio.Wave.AsioAudioAvailableEventArgs.WrittenToOutputBuffers
getset

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


The documentation for this class was generated from the following file: