BASS_WASAPI_GetDeviceInfo

Retrieves information on a device.

BOOL BASS_WASAPI_GetDeviceInfo(
    DWORD device,
    BASS_WASAPI_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_WASAPIWASAPI is not available.
BASS_ERROR_DEVICEdevice is invalid.

Remarks

This function can be used to enumerate the available devices for a setup dialog.

Example

Get the total number of output devices currently present.
int a, count=0;
BASS_WASAPI_DEVICEINFO info;
for (a=0; BASS_WASAPI_GetDeviceInfo(a, &info); a++)
    if (!(info.flags&BASS_DEVICE_INPUT) // device is an output device (not input)
            && (info.flags&BASS_DEVICE_ENABLED)) // and it is enabled
        count++; // count it

See also

BASS_WASAPI_GetInfo, BASS_WASAPI_Init, BASS_WASAPI_SetNotify, BASS_WASAPI_DEVICEINFO structure