Wrapper class for Cocoa Audio Units in Carbon Hosts
Wrapper class for Cocoa Audio Units in Carbon Hosts
- Subject: Wrapper class for Cocoa Audio Units in Carbon Hosts
- From: Seth Nickell <email@hidden>
- Date: Thu, 6 Aug 2009 10:40:36 -0700
A few people have posted about trying to get their Cocoa UI AU working in a Carbon-only host (e.g. Ableton Live). Symtom is: host will only load your generic UI.
Attached is a simplistic class "AUCarbonViewCocoaWrapper" for solving the problem (BSD license). Just include the two files in the build, edit the exported symbols list and resource file, and you've got a Carbon AU. More detailed instructions are included in the header's comments.
AUCarbonViewCocoaWrapper just queries the AU for its Cocoa UI bundle, instantiates the Cocoa NSView, and embeds it in a HICocoaView, creating a AUCarbonView containing the Cocoa UI. Downside: using HICocoaView means this only works on 10.5 or greater (if anyone has a fix they're willing to share, I'd be more than happy to wrap it into the code). Any improvements/fixes happily accepted. I'm not 100% sure if HICocoaView releases the NSView when its done, but leaks doesn't report any problems.
Hope this saves somebody a little time/frustration,
-Seth
Attachment:
AUCarbonViewCocoaWrapper.zip
Description: Zip archive
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden