Assembly: Bass.Net (in Bass.Net.dll) Version: 22.214.171.124
[DllImportAttribute("bassasio.dll", CharSet = CharSet.Auto)] public static bool BASS_ASIO_Init( int device, BASSASIOInit flags )
<DllImportAttribute("bassasio.dll", CharSet := CharSet.Auto>] Public Shared Function BASS_ASIO_Init ( device As Integer, flags As BASSASIOInit ) As Boolean
public: [DllImportAttribute(L"bassasio.dll", CharSet = CharSet::Auto)] static bool BASS_ASIO_Init( int device, BASSASIOInit flags )
[<DllImportAttribute("bassasio.dll", CharSet = CharSet.Auto)>] static member BASS_ASIO_Init : device : int * flags : BASSASIOInit -> bool
- Type: SystemInt32
The device to use... 0 = first device. BASS_ASIO_GetDeviceInfo(Int32, BASS_ASIO_DEVICEINFO) can be used to get the total number of devices.
- Type: Un4seen.BassAsioBASSASIOInit
Any combination of these flags (see BASSASIOInit):
BASS_ASIO_THREAD Host the driver in a dedicated thread, else the current thread. BASS_ASIO_JOINORDER Place joined channels in the order in which BASS_ASIO_ChannelJoin(Boolean, Int32, Int32) was called to join them, else place them in numerically ascending order. BASS_ASIO_VOLRAMP Ramp volume changes (of output channels).
Return ValueType: Boolean
If the device was successfully initialized, is returned, else is returned. Use BASS_ASIO_ErrorGetCode to get the error code.
This function must be successfully called before any input or output can be performed.
The ASIO driver is accessed via a COM object using the single-threaded apartment model, which means that requests to the driver go through the thread that initialized it, so the thread needs to exist as long as the driver remains initialized. The thread should also have a message queue. If device initializing and releasing from multiple threads is required, or the application does not have a message queue (eg. a console application), then the BASS_ASIO_THREAD flag can be used to have BASSASIO create a dedicated thread to host the ASIO driver.
Simultaneously using multiple devices is supported in the BASSASIO API via a context switching system - instead of there being an extra "device" parameter in the function calls, the device to be used is set prior to calling the functions. BASS_ASIO_SetDevice(Int32) is used to switch the current device. When successful, BASS_ASIO_Init automatically sets the current thread's device to the one that was just initialized.
|BASS_ERROR_DEVICE||The device number specified is invalid.|
|BASS_ERROR_ALREADY||A device has already been initialized. You must call BASS_ASIO_Free before you can initialize again.|
|BASS_ERROR_DRIVER||The driver couldn't be initialized.|