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
name | Description of the device.
|
id | The device's ID.
|
type | The type of device, which may be one of the following.
BASS_WASAPI_TYPE_NETWORKDEVICE | An audio endpoint device that the user accesses remotely through a network.
| BASS_WASAPI_TYPE_SPEAKERS | A set of speakers.
| BASS_WASAPI_TYPE_LINELEVEL | An 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_HEADPHONES | A set of headphones.
| BASS_WASAPI_TYPE_MICROPHONE | A microphone.
| BASS_WASAPI_TYPE_HEADSET | An earphone or a pair of earphones with an attached mouthpiece for two-way communication.
| BASS_WASAPI_TYPE_HANDSET | The 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_DIGITAL | An audio endpoint device that connects to an audio adapter through a connector for a digital interface of unknown type.
| BASS_WASAPI_TYPE_SPDIF | An audio endpoint device that connects to an audio adapter through a Sony/Philips Digital Interface (S/PDIF) connector.
| BASS_WASAPI_TYPE_HDMI | An audio endpoint device that connects to an audio adapter through a High-Definition Multimedia Interface (HDMI) connector or a DisplayPort.
| BASS_WASAPI_TYPE_UNKNOWN | An audio endpoint device with unknown physical attributes.
|
|
flags | The device's current and input/output status... a combination of these flags.
BASS_DEVICE_ENABLED | The device is enabled and ready for use. It will not be possible to initialize the device if this flag is not present.
| BASS_DEVICE_DEFAULT | The device is the system default.
| BASS_DEVICE_INIT | The device is initialized, ie. BASS_WASAPI_Init has been called.
| BASS_DEVICE_INPUT | The device is a recording device, otherwise it is an output device.
| BASS_DEVICE_LOOPBACK | The device is a loopback input device; it captures the sound from an output device.
| BASS_DEVICE_UNPLUGGED | The device does not have an audio jack connected. This is only applicable to devices that have jack-presence detection.
| BASS_DEVICE_DISABLED | The device has been disabled in the Sound control panel.
|
|
minperiod | The minimum update period in seconds.
|
defperiod | The default update period in seconds.
|
mixfreq | The sample rate in shared mode.
|
mixchans | The 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.
The corresponding BASS (DirectSound) device can be found by its BASS_DEVICEINFO "driver" member matching id.
See also
BASS_WASAPI_GetDeviceInfo