Initializes a recording device.
BOOL BASS_RecordInit( int device );
device | The device to use... -1 = default device, 0 = first. BASS_RecordGetDeviceInfo can be used to enumerate the available devices. |
BASS_ERROR_DEVICE | device is invalid. |
BASS_ERROR_ALREADY | The device has already been initialized. BASS_RecordFree must be called before it can be initialized again. |
BASS_ERROR_DRIVER | There is no available device driver. |
Simultaneously using multiple devices is supported in the BASS 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_RecordSetDevice is used to switch the current recording device. When successful, BASS_RecordInit automatically sets the current thread's device to the one that was just initialized.
The default device (device = -1) always maps to the "Default" device unless that has been disabled via the BASS_CONFIG_REC_DEFAULT config option. BASS_RecordGetDevice can be used afterwards to confirm which device is being used.
On Linux, a "Default" device is hardcoded to device number 0, which uses the default input set in the ALSA config; that could map directly to one of the other devices or it could use ALSA plugins.