Has anyone tried to load cocos inside an audiounit?

Auv3 is an apple technology to load extensions inside an app. Has anybody used it?

Thanks

I have not. But I did see there are some articles in using it with c++: https://audiokitpro.com/auv3-midi-tutorial-part3/

Hey @slackmoehrle , thanks for the reply. I know how to set up the audio. My question was regarding embedding the cococs2d view.
So far, I managed to include the view using some information from this post: https://www.raywenderlich.com/3029-how-to-integrate-cocos2d-and-uikit

The problem I’m having now is that setContentScaleFactor is not working when invoked from somewhere different from applicationDidFinishLaunching.

The AUv3 loads in a window that can be modified in size by the user. I managed to get the new dimensions by overriding (void)viewWillLayoutSubviews, but calling director->setContentScaleFactor(newlyCalculatedScale) doesn’t do anything. Do you have any idea why this might be happening?

Apparently multiple instances of Audio Units share the same process. I need to instantiate cocos in the same process N times, but can’t do this because I can’t have more than one Director.
Is there a workararound?

I think I remember on these forums that someone was working in multiple Directors.

But out of the box.

Can you somehow use multiple ref objects or anything?

I don’t know what you mean by multiple ref objects.

The audio units can have multiple instances running at the same time and they live in the same process. So cocos static variables are of no use :frowning:

My thought was that cocos2d::Ref is our base object. If you created Ref objects each with an audio instance in it, since it is technically inside a cocos2d object it would all run in the cocos2d main thread.

Maybe I’m not understanding, but the audio units instances can’t see memory between each other. They share the memory for statics but nothing else.
I need N different instances of cocos in the same process, but it seems to be impossible.