AU - GetLatency() and more
AU - GetLatency() and more
- Subject: AU - GetLatency() and more
- From: "Roni Music" <email@hidden>
- Date: Wed, 9 Mar 2005 14:22:19 +0100
Hi,
I'm building my first AU effect unit and have a couple of questions:
1. My effect has an internal latency of some number of samples. Is the only thing needed for my AU, to overide the
GetLatency() and report the latency (in seconds)?
There are some comments in the Process() in the sample concerning the ioSillence flag, do I need to bother about that flag?
None of the hosts I test with (GarageBand, AudioUnitHosting, Metro and Amadeus)
seems to compensate for the latency. Is there any host available as a demo that supports the GetLatency()?
2. I'm constructing my DSP object in my subclass to the AUKernelBase constructor and deleting it in the destructor:
When testing the AU with the AUValidation tool, I get the following error:
*** malloc[572]: error for object 0x379a80: Incorrect checksum for freed object - object was probably modified
after being freed, break at szone_error
* * PASS
If I don't delete the object, the error goes away. The only function that uses it, is the Process() function. If I never use the object
in the Process() the error also goes away. Does this mean that the Process() is called after the Kernel destructor?
The plugin works fine with all tested hosts. Btw, this is under OS X 10.2.8.
Just tested under 10.3.8, the error is not there. Is this a Jaguar issue only? Can I ignore the error?
3. Someone wrote on this list a couple of days ago:
"You will never get interleaved audio. That was obsoleted with AU v2; AUs (except converter AUs) now only get
non-interleaved audio. And no one makes v1 AUs, no hosts support them, etc., they are totally obsolete."
Then what does the inNumChannels variable in the Process() mean? It's always 1 when I test, which should be correct
according to the statement above.
The "Turning up the Volume with Audio Units" docs from Apple Developer does the following in the Process() function,
(as does the SampleAU example in the CoreAudio developer example):
while (nSampleFrames-- > 0)
{
Float32 inputSample = *sourceP;
sourceP += inNumChannels;
etc....
}
wouldn't
sourceP++;
be enough if the Process() always and only process one channel of non-interleaved data?
Thanks
Rolf Nilsson / Roni Music
_______________________________________________
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