• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AU Cocoa UI in Carbon window?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AU Cocoa UI in Carbon window?


  • Subject: AU Cocoa UI in Carbon window?
  • From: "tahome izwah" <email@hidden>
  • Date: Thu, 11 Sep 2008 15:22:11 +0200

Hi all,

I have written a Cocoa AudioUnit plug in and am trying to enable its
UI in AudioUnit hosts that do not yet support Cocoa UIs by using
HICocoaView in Leopard. For this I have two UI classes, the usual
Cocoa ViewFactory with the Cocoa view as well as a Carbon custom UI
for older hosts that only support Carbon UIs, such as Ableton Live. in
the Carbon UI I intend to load the Cocoa UI and use the Carbon view as
a wrapper for it. In order to accomplish this I have transplanted the
Carbon UI code CreateUI() from the custom Carbon UI AudioUnit template
to my Cocoa AU and I have verified that the Carbon UI is getting
called. So far so good - I can see the custom Carbon UI in hosts that
do not support Cocoa.

Now where I am stuck is how do I actually add the Cocoa view to the
Carbon mCarbonPane? I can load the Cocoa ViewFactory from the NIB
without problem and I am getting a valid AUView by instantiating my
Cocoa UI, but if I try using

	if (AUView != NULL) {
		HIViewRef wrapper = NULL;
		status = HICocoaViewCreate(AUView, 0, &wrapper);
		NSLog(@"1-status = %d", status);
		status = HIViewAddSubview(mCarbonPane, wrapper);
		NSLog(@"2-status = %d", status);
	}

I am getting no error and no UI (an empty window as a matter of fact),
or, alternatively

	if (AUView != NULL) {
		status = HICocoaViewSetView(mCarbonPane, AUView);
	}

I am getting a -50 and no UI. I have verified that the Carbon window
is a compositing window.

I think I am missing something fundamentally here and would appreciate
any insights you can offer because I am really stuck and don't know
where to look for advice.

Thank you very much,
--th
 _______________________________________________
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

  • Follow-Ups:
    • Re: AU Cocoa UI in Carbon window?
      • From: Michael Hopkins <email@hidden>
  • Prev by Date: Re: Examples for AudioFileStream and AudioConverter?
  • Next by Date: Re: Multi-bus rendering
  • Previous by thread: Re: dev. in leopard, won't run in tiger
  • Next by thread: Re: AU Cocoa UI in Carbon window?
  • Index(es):
    • Date
    • Thread