BASS.NET API for the Un4seen BASS Audio LibraryBassAsioHandlerAsioInputCallback Method BASS.NET API for the Un4seen BASS Audio Library
Provides a ready made ASIOPROC callback procedure which might be used for ASIO input.

Namespace: Un4seen.BassAsio
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public virtual int AsioInputCallback(
	bool input,
	int channel,
	IntPtr buffer,
	int length,
	IntPtr user
)

Parameters

input
Type: SystemBoolean
Dealing with an input channel? Must be , since we are only dealing with Asio input.
channel
Type: SystemInt32
The input channel number... 0 = first.
buffer
Type: SystemIntPtr
The pointer to the buffer containing the recorded data (input channel).
length
Type: SystemInt32
The number of BYTES to process.
user
Type: SystemIntPtr
Not used.

Return Value

Type: Int32
Returns 0, since we are only dealing with Asio input.
Remarks

To receive the recorded sample data you might use the InputChannel and set up a DSP on it.

If you intend to overload this callback in a derive implementation make sure to call the base method to not loose any functionatily.

Examples

Implementing your own callback in a derived implementation:
VB
Public Class MyAsioHandler 
  Inherits BassAsioHandler

  Public Overrides Function AsioInputCallback(input As Boolean, channel As Integer, buffer As IntPtr, length As Integer, user As IntPtr) As Integer
    ' InputChannel not applied yet
    ' do your own stuff here...
    Dim len As Integer = MyBase.AsioInputCallback(input, channel, buffer, length, user)
    ' InputChannel already applied
    ' do your own stuff here...
    Return len
  End Function

End Class
public class MyAsioHandler : BassAsioHandler
{

  public override int AsioInputCallback(bool input, int channel, IntPtr buffer, int length, IntPtr user)
  {
    // InputChannel not applied yet
    // do your own stuff here...
    int len = base.AsioInputCallback(input, channel, buffer, length, user);
    // InputChannel already applied
    // do your own stuff here...
    return len;
  }

}
See Also

Reference