BASS.NET API for the Un4seen BASS Audio Library

DEVICENOTIFYPROC Delegate

BASS.NET API for the Un4seen BASS Audio Library
Device list notification callback function used with BASS_CONFIG_DEV_NOTIFY.

Namespace:  Un4seen.Bass
Assembly:  Bass.Net (in Bass.Net.dll) Version: 2.4.18.0
Syntax

public delegate void DEVICENOTIFYPROC(
	BASSDEVICENotify notify
)

Parameters

notify
Type: Un4seen.BassBASSDEVICENotify
The notification, one of the following (see BASSDEVICENotify):
BASS_DEVICENOTIFY_ENABLEDThe BASS_DEVICE_ENABLED flag has been (un)set on one or more devices. This includes new devices, and both output and recording devices.
BASS_DEVICENOTIFY_DEFAULTThe output BASS_DEVICE_DEFAULT flag has changed device.
BASS_DEVICENOTIFY_DEFAULTCOMThe output BASS_DEVICE_DEFAULTCOM flag has changed device.
BASS_DEVICENOTIFY_REC_DEFAULTThe recording BASS_DEVICE_DEFAULT flag has changed device.
BASS_DEVICENOTIFY_REC_DEFAULTCOMThe recording BASS_DEVICE_DEFAULTCOM flag has changed device.
Remarks

The notification does not tell which device(s) has changed; the device lists need to be refreshed with BASS_GetDeviceInfo(Int32, BASS_DEVICEINFO) and BASS_RecordGetDeviceInfo(Int32, BASS_DEVICEINFO) to find that out. There may be multiple notifications in quick succession, eg. connecting new hardware may result in notifications for a new output device, new recording device, and new default devices. So you may want to wait a bit before refreshing the device list(s), but do not wait in the callback, eg. start a timer instead.

Devices should not be initialized or freed within a callback. Do that in another thread.

See Also

Reference