BASS_DEVICEINFO structure

Used with BASS_GetDeviceInfo or BASS_RecordGetDeviceInfo to retrieve information on a device.

typedef struct {
    char *name;
    char *driver;
    DWORD flags;
} BASS_DEVICEINFO;

Members

nameDescription of the device.
driverDriver identification.
flagsThe device's current status... a combination of these flags.
BASS_DEVICE_ENABLEDThe device is enabled. 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_DEFAULTCOMThe device is the system default communication device.
BASS_DEVICE_INITThe device is initialized, ie. BASS_Init or BASS_RecordInit has been called.
BASS_DEVICE_LOOPBACKThe device is a loopback recording device; it captures the sound from an output device. The corresponding output device can be identified by having the same driver value.
The type of device may also be indicated in the high 8 bits (use BASS_DEVICE_TYPE_MASK to test), and can be one of the following.
BASS_DEVICE_TYPE_DIGITALAn audio endpoint device that connects to an audio adapter through a connector for a digital interface of unknown type.
BASS_DEVICE_TYPE_DISPLAYPORTAn audio endpoint device that connects to an audio adapter through a DisplayPort connector.
BASS_DEVICE_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_DEVICE_TYPE_HDMIAn audio endpoint device that connects to an audio adapter through a High-Definition Multimedia Interface (HDMI) connector.
BASS_DEVICE_TYPE_HEADPHONESA set of headphones.
BASS_DEVICE_TYPE_HEADSETAn earphone or a pair of earphones with an attached mouthpiece for two-way communication.
BASS_DEVICE_TYPE_LINEAn 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_DEVICE_TYPE_MICROPHONEA microphone.
BASS_DEVICE_TYPE_NETWORKAn audio endpoint device that the user accesses remotely through a network.
BASS_DEVICE_TYPE_SPDIFAn audio endpoint device that connects to an audio adapter through a Sony/Philips Digital Interface (S/PDIF) connector.
BASS_DEVICE_TYPE_SPEAKERSA set of speakers.

Remarks

When a device is disabled/disconnected, it is still retained in the device list, but the BASS_DEVICE_ENABLED flag is removed from it. If the device is subsequently re-enabled, it may become available again with the same device number, or the system may add a new entry for it.

When a new device is connected, it can affect the other devices and result in the system moving them to new device entries. If an affected device is initialized, it will stop working and will need to be reinitialized using its new device number.

Platform-specific

On Windows Vista and newer, driver is the device's endpoint ID. On older Windows, it is a filename and further information can be obtained from the file via the GetFileVersionInfo function. On macOS, driver is the device's UID, and on Linux it is the ALSA device name. It is unused on other platforms. The device type is only available on Windows (Vista and newer) and macOS. On Windows, DisplayPort devices will have BASS_DEVICE_TYPE_HDMI rather than BASS_DEVICE_TYPE_DISPLAYPORT.

On Windows and macOS, when the BASS_CONFIG_DEV_DEFAULT option is enabled, the BASS_DEVICE_DEFAULT flag will be set on both the "Default" device and the device that it currently maps to. The BASS_DEVICE_DEFAULTCOM flag is only used on Windows Vista and newer.

Depending on the BASS_CONFIG_UNICODE config setting, name and driver can be in ANSI or UTF-8 form on Windows. They are always in UTF-8 form on other platforms.

See also

BASS_GetDeviceInfo, BASS_RecordGetDeviceInfo, BASS_CONFIG_UNICODE