Three problems with MusicDevice, AU
Three problems with MusicDevice, AU
- Subject: Three problems with MusicDevice, AU
- From: Andrew Mead Mc Clure <email@hidden>
- Date: Fri, 26 Sep 2003 18:24:02 -0500 (EST)
Hi. I may be about to ask some stupid questions, but I have some issues I
have been unable to resolve with the available documentation. For the
record: I am using Logic Audio 5 as my audiounits host, and I am using
WWDC Panther with xCode.
1. I have created a MusicDeviceBase subclass audiounit. It works, but I
would like for it to take the current position of the modulation wheel
into consideration when rendering its audio. I am trying to figure out if
there's any "built-in" way to find out the current state of the modulation
and pitch bend wheels, or do I have to watch all the incoming midi events
and keep track of them myself? From looking at
file:///Developer/Documentation/CoreAudio/AudioUnits/index.html , it looks
like i should be able to get the modulation value by saying:
GetParameter(1, kAudioUnitScope_Group, 0, modulation);
Where "modulation" is a Float32 variable in the current scope. However,
this doesn't work. Not only doesn't it work, somehow, when I make this
function call, the program flow is somehow taken away from me and goes....
...somewhere else. I don't know where. All I know is that if I call
GetParameter, none of the code in the function after I call GetParameter
is executed. I would step through this in the debugger, but I have had
trouble getting the debugger to work. If I did manage to get GetParameter
to return, what range would the returned value be in [for the modulation
and pitch bend wheels]?
2. I'm less certain if this one can be answered without seeing my actual
code, but I took some of my parameter/settings code out of an effect
audiounit I had made and put it into my MusicDevice subclass. For some
reason, however, when I run the program and go to my MusicDevice's
settings, Logic is not showing it as having any parameters. This is a
little bit strange. I do not know if there is some kind of error happening
when I tell Logic what my parameters are, or if I am just not telling it
correctly.
What EXACTLY is it that lets the host application know what the available
parameters and their ranges for an AudioUnit are? The docs aren't clear on
this, or if they are I missed where. The way I am doing this in my
non-working plugin is by implementing the folowing two methods in my
object. The code to the methods is the same as in my effect plug-ins, and
Logic is aware of their [the effect plugins] parameters correctly.
ComponentResult GetParameterInfo(AudioUnitScope inScope,
AudioUnitParameterID inParameterID, AudioUnitParameterInfo &
outParameterInfo);
ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
AudioUnitParameterID inParameterID, CFArrayRef * outStrings);
Is there something else I need to do? Or am I likely just not
formatting/creating my response in these two methods correctly?
3. As mentioned, I've been having LOTS of trouble getting the debugger to
work with my AudioUnits plugin. I'd give specifics, but it seems to just
be kind of random. Sometimes, I can enter the debugger and step through my
code. However, sometimes, calls to Debugger() fail to work but my
breakpoints are respected; sometimes my breakpoints are ignored but calls
to Debugger() work; sometimes neither work, sometimes one or both work but
ONLY if the Debugger() invocation/breakpoint are in another source file
from my audiounit... most of the time what seems to happen with Debugger()
is that it will successfully enter the debugger, but Debugger() will leave
me in mach_msg_trap or some other system function, and no amount of
stepping forward will bring me to a point where I have source code
information.. these different things seem to happen seemingly randomly,
with no apparent pattern or reason to them.
Am I missing something obvious? My debugger is working in that the
"Executable" in my project has as its Path to Executable the executable
for Logic Audio, so gdb just runs that..
Thanks!
- Andrew McClure
email@hidden
http://charon.sjs.org/~mcc
_______________________________________________
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.