Assembly: Bass.Net (in Bass.Net.dll) Version: 188.8.131.52
[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)] public static bool BASS_RecordSetDevice( int device )
<DllImportAttribute("bass.dll", CharSet := CharSet.Unicode>] Public Shared Function BASS_RecordSetDevice ( device As Integer ) As Boolean
public: [DllImportAttribute(L"bass.dll", CharSet = CharSet::Unicode)] static bool BASS_RecordSetDevice( int device )
[<DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)>] static member BASS_RecordSetDevice : device : int -> bool
- Type: SystemInt32
The device to use... 0 = first recording device.
Return ValueType: Boolean
If successful, then is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
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. The device setting is local to the current thread, so calling functions with different devices simultaneously in multiple threads is not a problem.
The functions that use the recording device selection are the following: BASS_RecordFree, BASS_RecordGetInfo(BASS_RECORDINFO), BASS_RecordGetInput(Int32, Single), BASS_RecordGetInputName(Int32), BASS_RecordSetInput(Int32, BASSInput, Single), BASS_RecordStart(Int32, Int32, BASSFlag, RECORDPROC, IntPtr).
When one of the above functions (or BASS_RecordGetDevice) is called, BASS will check the current thread's recording device setting, and if no device is selected (or the selected device is not initialized), BASS 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 - BASS will automatically use the device that's initialized. Even if you free the device, and initialize another, BASS will automatically switch to the one that is initialized.
|BASS_ERROR_DEVICE||device is invalid.|
|BASS_ERROR_INIT||The device has not been initialized.|