Hi
I see that Juce version 4.2 added support for Audio Unit V3 on iOS. Does this also include hosting?
Hi
I see that Juce version 4.2 added support for Audio Unit V3 on iOS. Does this also include hosting?
Yes, it does!
And, running the risk of you telling me to get off my backside and find out for myself, does it also provide the mechanism which allows the host app to render the pluginās UI as if itās āembeddedā within the host?
Yep, thatās right.
Brilliant, youāve inspired me to give it a whirl but Iāve run into a couple of build problems. This is what Iāve done:
There seem to be a couple of compilation errors in juce_audioUnitPluginFormat.mm due to the use of āNSViewControllerā. I went with Xcodeās suggestion of changing them to āUIViewControllerā, which Iāve no idea is appropriate but that got me to the linker, which seems to be unhappy about not being able to find the AudioUnit framework (full log below). Itās strange, the framework seems to be there and if I look at its properties it seems to be the right one (ie. the one from iPhoneIS9.3.sdk). Iāve tried removing/re-adding it in Xcode with clean builds in between but still the same problem.
Iām on Xcode 7.3. Let me know if you want me to try anything ā¦
Ld build/Debug/Plugin\ Host.app/Plugin\ Host normal arm64
cd "/Users/Me/Desktop/JUCE-master/examples/audio plugin host/Builds/iOS"
export IPHONEOS_DEPLOYMENT_TARGET=9.3
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -L/Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug -F/Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug -filelist /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Plugin\ Host.build/Debug-iphoneos/Plugin\ Host\ (App).build/Objects-normal/arm64/Plugin\ Host.LinkFileList -miphoneos-version-min=9.3 -dead_strip -Xlinker -no_deduplicate -fembed-bitcode-marker -framework AudioUnit -framework Accelerate -framework AudioToolbox -framework AVFoundation -framework CoreAudio -framework CoreAudioKit -framework CoreGraphics -framework CoreMIDI -framework CoreText -framework Foundation -framework OpenGLES -framework QuartzCore -framework UIKit -Xlinker -dependency_info -Xlinker /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Plugin\ Host.build/Debug-iphoneos/Plugin\ Host\ (App).build/Objects-normal/arm64/Plugin\ Host_dependency_info.dat -o /Users/mborstel/Desktop/JUCE-master/examples/audio\ plugin\ host/Builds/iOS/build/Debug/Plugin\ Host.app/Plugin\ Host
ld: framework not found AudioUnit
clang: error: linker command failed with exit code 1 (use -v to see invocation)
OK this is fixed on the develop branch. I just tried the āaudio plugin hostā sample and was surprised that it actually works on our iPad mini 2 - albeit being nearly impossible to control with my fat fingers :-). I was able to hook up the JuceDemoPlugin . See screenshot below:
was surprised that it works quite well
Yeah I think I still code for those moments of surprise. Like spending a week writing a new renderer before you can run it. Nine times out of ten youāll just get a black screen if youāre lucky, but one time in ten itāll pop into life first time - canāt beat that feeling!
Well done, Iāll try it out!
Yep I can confirm it works. Some minor display issues with a (or should I say, one of the only) 3rd party plugins but as proof of concept it does the job admirably.
FYI the layout issue is actually a bug in the Arturia plugin. In AUv3 the plugin is supposed to resize to fit the host, but theyāve clearly hard-coded their layout to fit GarageBand, and are ignoring the size weāre giving it.
I seem to vaguely remember reading some early docs about AUs on iOS which suggested that they had to adhere to some quite specific dimensions. Although there again that may have been some web article based on what was being seen in Garage Band. Anyway, if resizing is possible that great news for those writing hosts - but possibly a headache for some plugin developers!
There is a new preferredSize
call in AUv3 with which you can ask the plug-in for itās āpreferred sizeā. We donāt have hosting support for that atm but it would be a good idea to add it.