Re: carbon or cocoa?
Re: carbon or cocoa?
- Subject: Re: carbon or cocoa?
- From: "Mark's Studio" <email@hidden>
- Date: Fri, 19 Mar 2004 08:39:39 +0100
I had a Cocoa synth app in ObjC that i wanted to turn into a AU.
So i took the SamoleEffectUnit example and modified it to
have a AUCarbonViewBase with a button "Show Cocoa Editor"
that loads the Cocoa view and start the NSApp.
The Cocoa stuff has to be in a new window.
- (id)init {
self = [super init];
NSApplicationLoad();
if (! [NSBundle loadNibNamed: @"Cocoa" owner: self]) {
NSLog(@"Loading Cocoa.nib failed");
}
return self;
}
I did not use any of the standard ways of making a AUCocoaUIBase, so it
would not work in a Cocoa only Host
but i think it would be easy to do both.
I also had to change the .cpp to .mm files to be able to call my ObjC
code like this.
ComponentResult SampleEffectUnit::Render(AudioUnitRenderActionFlags
&ioActionFlags, const AudioTimeStamp &inTimeStamp,UInt32 nFrames)
{
[[cocoaController synthOutlet] makeAudioLeft:bufLeft Right:
bufRight numberOfFrames: nFrames silence: ioSilence];
}
It was also possible to have the Cocoa controllers write automation in
Logic, but that was very difficult, i can't remember if i
got it all the things working.
But i will say that it's possible, i have not checked if the
performance is worse than the same thing just using carbon and no ObjC.
On 19/3-2004, at 5:38, David Cake wrote:
>
At 7:05 PM +0100 18/3/04, Mark's Studio wrote:
>
> I will just say that i have managed to make a AU with a Cocoa view
>
> that
>
> works in a host that only supports Carbon views, so it's possible.
>
>
Could you elaborate?
>
Regards
>
Dave
>
_______________________________________________
>
coreaudio-api mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
>
Do not post admin requests to the list. They will be ignored.
>
>
Peter Mark
Mark's Recording Studio A/S
Lundeskovsvej 3
2900 Hellerup
Denmark
Tel: +45 35366078 Fax: +45 35366038
www.marks-studio.dk
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.