Re: Why is this audio unit producing a distorted sound
Re: Why is this audio unit producing a distorted sound
- Subject: Re: Why is this audio unit producing a distorted sound
- From: Simon Haycock <email@hidden>
- Date: Thu, 11 Jul 2013 22:25:39 +0100
Hi Chaim
I am sure I managed to get Xcode 2/3 to run and monitor AU Lab, which opened a default AU Lab session containing my plugin. This allowed me to view printf messages... It was a scrappy way of printing, but it worked nonetheless. I have tried 'Attach To Process' with AU Lab, but didn't seem to do much... An alternative (which I worked on initially) is to create some sort of logging system to write your sample values to a text file.
I just tried to build my old AU, but got nasty clangs, so tried to make a new AU. I had no idea the entry had gone from the templates list to make a new AU. So found this to restore my templates: http://www.mojolama.com/restore-apples-audio-unit-templates
I then found a link to Apple's template for an AU with a cocoa view (could have really done with a few years ago!).
https://developer.apple.com/library/mac/#samplecode/StarterAUEffectWithCocoaUI/Introduction/Intro.html#//apple_ref/doc/uid/DTS40011650
I have built and tested it and it works fine (OS 10.7.5, Xcode 4.6.2). It does exactly the same as your AU. Perhaps you could use Apple's example to see where your problem lies?
About the number of channels, I believe I am thoroughly mistaken, as numOfChannels is always 1, and if your AU is stereo, two kernels are made which use the same process function on both channels, so your process function should be made for mono audio only. To do stereo requires special considerations which have been discussed in detail in other list topics.
Did you manage to record the output of your unit and load the recording into a wave editor?
Simon
On 9 Jul 2013, at 16:35, Chaim Peck wrote:
> Thanks. I did not consider that it could be more than one channel. If it is more than one, then do I do processing on inFramesToProcess * inNumChannels samples?
>
> This may sound like a dumb question, but what is the best way to print output when trying to debug an audio unit?
>
> I noticed that print_r() statements will be displayed when I run auval, but when debugging the audio unit inside AU Lab, is there an ideal way to display messages?
>
> Thanks,
> Chaim
>
_______________________________________________
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