BASS_WASAPI_DEVICEINFO structure

Used with BASS_WASAPI_GetDeviceInfo to retrieve information on a device.

typedef struct {
    char *name;
    char *id;
    DWORD type;
    DWORD flags;
    float minperiod;
    float defperiod;
    DWORD mixfreq;
    DWORD mixchans;
} BASS_WASAPI_DEVICEINFO;

Members

nameDescription of the device.
idThe device's ID.
typeThe type of device, which may be one of the following.
BASS_WASAPI_TYPE_NETWORKDEVICEAn audio endpoint device that the user accesses remotely through a network.
BASS_WASAPI_TYPE_SPEAKERSA set of speakers.
BASS_WASAPI_TYPE_LINELEVELAn audio endpoint device that sends a line-level analog signal to a line-input jack on an audio adapter or that receives a line-level analog signal from a line-output jack on the adapter.
BASS_WASAPI_TYPE_HEADPHONESA set of headphones.
BASS_WASAPI_TYPE_MICROPHONEA microphone.
BASS_WASAPI_TYPE_HEADSETAn earphone or a pair of earphones with an attached mouthpiece for two-way communication.
BASS_WASAPI_TYPE_HANDSETThe part of a telephone that is held in the hand and that contains a speaker and a microphone for two-way communication.
BASS_WASAPI_TYPE_DIGITALAn audio endpoint device that connects to an audio adapter through a connector for a digital interface of unknown type.
BASS_WASAPI_TYPE_SPDIFAn audio endpoint device that connects to an audio adapter through a Sony/Philips Digital Interface (S/PDIF) connector.
BASS_WASAPI_TYPE_HDMIAn audio endpoint device that connects to an audio adapter through a High-Definition Multimedia Interface (HDMI) connector or a DisplayPort.
BASS_WASAPI_TYPE_UNKNOWNAn audio endpoint device with unknown physical attributes.
flagsThe device's current and input/output status... a combination of these flags.
BASS_DEVICE_ENABLEDThe device is enabled and ready for use. It will not be possible to initialize the device if this flag is not present.
BASS_DEVICE_DEFAULTThe device is the system default.
BASS_DEVICE_INITThe device is initialized, ie. BASS_WASAPI_Init has been called.
BASS_DEVICE_INPUTThe device is a recording device, otherwise it is an output device.
BASS_DEVICE_LOOPBACKThe device is a loopback input device; it captures the sound from an output device.
BASS_DEVICE_UNPLUGGEDThe device does not have an audio jack connected. This is only applicable to devices that have jack-presence detection.
BASS_DEVICE_DISABLEDThe device has been disabled in the Sound control panel.
minperiodThe minimum update period in seconds.
defperiodThe default update period in seconds.
mixfreqThe sample rate in shared mode.
mixchansThe number of channels in shared mode.

Remarks

If none of the BASS_DEVICE_ENABLED, BASS_DEVICE_DISABLED, or BASS_DEVICE_UNPLUGGED flags are present, then the device is not present. That could be because it is an unplugged USB device or it has been disabled in Device Manager, for example.

Depending on the BASS_CONFIG_UNICODE config setting, name and id can be in ANSI or UTF-8 form. minperiod, defperiod, mixfreq, mixchans will all be 0 when the device is not enabled (BASS_DEVICE_ENABLED flag not present).

The corresponding BASS device can be found by its BASS_DEVICEINFO "driver" member matching id.

See also

BASS_WASAPI_GetDeviceInfo