transport - How can an Audio Unit detect start and stop of its host? -


how can audio unit component detect start , stop of audio unit host?

within component's kernel process(), tried callhosttransportstate(...) method, returns whether host playing or not, therefore can detect first start; process() not called anymore when host stops, can't detect stop way. , since stop not detected, can't detect next start because state "stopped" has not been detected.

any idea?

thanks.

well, doesn't seem there particular property can listen regarding host transport state changes, means need monitor them yourself. off top of head, easiest way create new runloop (ie using cfrunloop or nsrunloop depending on whether in c++/obj-c layer) , pass reference idle function, in turn pass state of host's transport plugin.

this task accomplished overriding idle() in vst world, since audiounits pull-oriented instead of push-oriented, need pull information , push plugin hand.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -