Sets the device to use for subsequent calls in the current thread.
BOOL BASS_ASIO_SetDevice( DWORD device );
|device||The device to use.|
|BASS_ERROR_DEVICE||The device number specified is invalid.|
|BASS_ERROR_INIT||The device has not been initialized.|
The device context setting is used by any function that may result in a BASS_ERROR_INIT error (except this function), which is the majority of them. When one of those functions is called, it will check the current thread's device setting, and if no device is selected (or the selected device is not initialized), BASSASIO will automatically select the lowest device that is initialized. This means that when using a single device, there is no need to use this function - BASSASIO will automatically use the device that is initialized. Even if you free the device, and initialize another, BASSASIO will automatically switch to the one that is initialized.
BASS_ASIO_SetDevice(2); // select device 2 rate = BASS_ASIO_GetRate(); // get the sample rate