Author Topic: wasapi: how to know if a device is added or removed  (Read 208 times)

MB_SOFT

  • Posts: 479
in my app i have several combobox listing all the wasapi input devices

currently i refresh the list (BASS_WASAPI_GetDeviceInfo) every time the user open the settings form but on some system this is taking longtime ...2 or 3 seconds for every combobox ...

i would refresh the list only if necessary so only if a new device is added or a device is removed from the system. do the WasapiNotifyProc inform me on all wasapi devices in the system? or only the ones that i have initialized?

Ian @ un4seen

  • Administrator
  • Posts: 25734
Re: wasapi: how to know if a device is added or removed
« Reply #1 on: 28 Mar '23 - 17:43 »
A WASAPINOTIFYPROC function (set via BASS_WASAPI_SetNotify) should be called whenever a device is added (notify=BASS_WASAPI_NOTIFY_ENABLED) or removed (notify=BASS_WASAPI_NOTIFY_DISABLED), including those that have not been initialized.