Retrieves information on a recording device.
BOOL BASS_RecordGetDeviceInfo(
DWORD device,
BASS_DEVICEINFO *info
);
| device | The device to get the information of... 0 = first. |
| info | Pointer to a structure to receive the information. |
| BASS_ERROR_DX | A sufficient version of DirectX is not installed. |
| BASS_ERROR_DEVICE | device is invalid. |
On Linux, a "Default" device is hardcoded to device number 0, which uses the default input set in the ALSA config.
int a, count = 0;
BASS_DEVICEINFO info;
for (a = 0; BASS_RecordGetDeviceInfo(a, &info); a++)
if (info.flags & BASS_DEVICE_ENABLED) // device is enabled
count++; // count it
Find a microphone.
int a;
BASS_DEVICEINFO info;
for (a = 0; BASS_RecordGetDeviceInfo(a, &info); a++)
if ((info.flags & BASS_DEVICE_ENABLED) && (info.flags & BASS_DEVICE_TYPE_MASK) == BASS_DEVICE_TYPE_MICROPHONE) { // found an enabled microphone
// do something
}