Observe a n AudioDevice removal

(ffx) #1


I would would like to observe the removal of an track dsp device. Cannot find a hint in the documentation. Also for instruments I cannot find such observable… e.g. I added observers to vst-parameters and suddenly the device was removed…

(joule) #2



They will return an event - { type = “remove”, index = 2 }

If you need to recall some kind of information about the removed device, other than the old index number, you’d have to store this in some custom structure.

PS. Any old parameter notifiers (or something else) being active within the device will auto-destruct if the device is removed, so you won’t have to worry about removing these manually.

(ffx) #3


And any idea for instruments?

(joule) #4

I was reading a bit too quickly.


(ffx) #5

Will vst-parameter-notifiers be removed automatically, too? Since it seems that at sng.instruments_observable trigger the device at event.index already is destroyed and no way to remove it manually…?

(joule) #6

Each notifier running from an observable should auto-destruct whenever a parent object or table is deleted. It seems to be very reliable. You shouldn’t have to worry that a single thing slips by :slight_smile: