Retrieves information on an output device.

BOOL BASS_GetDeviceInfo(
    DWORD device,


deviceThe device to get the information of... 0 = first.
infoPointer to a structure to receive the information.

Return value

If successful, then TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_DEVICEdevice is invalid.


This function can be used to enumerate the available devices for a setup dialog. Device 0 is always the "no sound" device, so you should start at device 1 if you only want to list real output devices.


On Linux, a "Default" device is hardcoded to device number 1, which uses the default output set in the ALSA config, and the real devices start at number 2. That is also the case on Windows and OSX when the BASS_CONFIG_DEV_DEFAULT option is enabled.


Get the total number of real devices currently present.
int a, count=0;
for (a=1; BASS_GetDeviceInfo(a, &info); a++)
    if (info.flags&BASS_DEVICE_ENABLED) // device is enabled
        count++; // count it

See also

BASS_GetInfo, BASS_Init, BASS_DEVICEINFO structure