BASS_GetDeviceInfo

Retrieves information on an output device.

BOOL BASS_GetDeviceInfo(
    DWORD device,
    BASS_DEVICEINFO *info
);

Parameters

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.

Remarks

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.

Example

Get the total number of real devices currently present.
int a, count = 0;
BASS_DEVICEINFO info;
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