Dear audio developers,
I am currently investigating Audio Unit v3 - App extension mechanism in OS X context.
I managed to build OSXFilterDemoAppExtension from https://developer.apple.com/library/content/samplecode/AudioUnitV3Example/Introduction/Intro.html
Using Logic 10.2.4, I was able to instantiate the FilterDemoAppExtension on my audio tracks.
This was working fine right out-of-the-box. 🙂
Once instantiated I could see the new process created which confirms my app runs in its own sandboxed process.
Problems started when I tried to add & remove multiple instances of the same app extension on other tracks, as per the following sequence:
1 - Add FilterDemoAppExtension on track1 insert.
A new dedicated process is created.
2 - Add FilterDemoAppExtension on track2 insert.
No other process created, both app extension seem to run in the same process successfully.
3 - Remove one of the instance.
I cannot see the dedicated process running anymore, and the remaining instance view becomes black and unresponsive...
As I am not really familiar today with App Extension and Sandboxing principles I wonder:
- is there any option I should use to force creating a dedicated process for each instance created ?
- should I use a reference counted mechanism to avoid process termination on first desctruction of one of the instance ?
- could it be a Logic bug I am falling into there ?
- or am I missing something else ?
Thank you for your help,
Cheers
Thanks for the clarification - yes indeed this is the case and there's no way to force a new extension process for each instance of the same audio unit being instantiated multiple times. So, indeed if your audio unit dies it will take out the other instances - but host survival is the main benefit which didn't exist previously. There are performance considerations in this design and were touched upon in the WWDC discussion of Audio Unit Extensions you may want to take a look at if you haven't seen it already.
Hope that's helpful.