Re: Logic Platinum for Audio Units question
Re: Logic Platinum for Audio Units question
- Subject: Re: Logic Platinum for Audio Units question
- From: Marc Poirier <email@hidden>
- Date: Thu, 5 Dec 2002 19:56:46 +0100 (CET)
>
Ok, looks like I solved that part of the problem. The Audio
>
Preferences in Logic have to be explicitly set to use CoreAudio first.
>
Now I can see the Inserts.
>
>
Unfortunately, when I try to run Logic Audio now and my component is
>
in the Components folder, Logic throws an Access Fault Exception during
>
the "Initializing Core Audio..." phase of startup.
>
>
I can't trace the problem because it never seems to actually go into
>
any of my code. Anyone know how I can debug this? All I see in the
>
stack window are assembler stuff...no calls to my component, and my
>
breakpoints are never hit.
>
>
Perhaps there is someplace someone out there knows that *will* be hit
>
if I set a breakpoint on it? Or if someone else has seen a similar
>
issue when porting VST to Audio Units, maybe a pointer on what to look
>
for?
Yeah, the first place that will get accessed in your AU is the entry
point. If you need to debug there, then explicitly write out your entry
point code rather than using the handy COMPONENT_ENTRY macro. Basically
it will look something like this:
extern "C" ComponentResult HowardPlugEntry(ComponentParameters *params,
HowardPlug *obj);
extern "C" ComponentResult HowardPlugEntry(ComponentParameters *params,
HowardPlug *obj)
{
return ComponentEntryPoint<Class>::Dispatch(params, obj);
}
where HowardPlug is the name of your plugin class. Then you can at least
put printfs before calling Dispatch looking inside the params struct, and
perhaps print out the result of Dispatch calls, too, etc...
Okay, actually, I wrote something like this once for my first AU when I
was having horrible problems with it, so in case it's useful to you or
anyone (I still have it in there commented out), here was my sort of
helpful entry point debug code (it could be improved a lot, if necessary):
extern "C" ComponentResult PolarizerEntry(ComponentParameters *params,
Polarizer *obj);
extern "C" ComponentResult PolarizerEntry(ComponentParameters *params,
Polarizer *obj)
{
// UInt8 flags; // call modifiers: sync/async,
deferred, immed, etc
// UInt8 paramSize; // size in bytes of actual
parameters passed to this call
// short what; // routine selector, negative for
Component management calls
// long params[1]; // actual parameters for the
indicated routine
printf("\n");
printf("pola!\n");
printf("flags = %d\n", params->flags);
printf("paramSize = %d\n", params->paramSize);
printf("what = ");
switch (params->what)
{
case -1:
printf("kComponentOpenSelect");
break;
case -2:
printf("kComponentCloseSelect");
break;
case -3:
printf("kComponentCanDoSelect");
break;
case -4:
printf("kComponentVersionSelect");
break;
case -5:
printf("kComponentRegisterSelect");
break;
case -6:
printf("kComponentTargetSelect");
break;
case -7:
printf("kComponentUnregisterSelect");
break;
case -8:
printf("kComponentGetMPWorkFunctionSelect");
break;
case -9:
printf("kComponentExecuteWiredActionSelect");
break;
case -10:
printf("kComponentGetPublicResourceSelect");
break;
default:
printf("%d", params->what);
break;
}
printf("\n");
printf("param[0] = %ld\n", params->params[0]);
printf("obj = %ld\n", (long)obj);
printf("\n");
return ComponentEntryPoint<Polarizer>::Dispatch(params, obj);
}
_______________________________________________
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.