• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why is this audio unit producing a distorted sound
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: Fri, 12 Jul 2013 08:02:57 +0100

Hi Chaim

Thanks for that link. It will be very useful in future.

I find Abobe Audition is the easiest wave editor to work with when analysing actual sample values in graphical form. Other editors (like 'Wave Editor' and 'Wavelab') do not display sample value in such a trustworthy way.

Glad you found the source of your problem. I am kicking myself for not seeing that!

Cheers

Simon

On 12 Jul 2013, at 07:32, Chaim Peck <email@hidden> wrote:

Thank you for such a thorough answer.

I found the problem with the distortion. I was using inSourceP and not sourceP:


void TestAudioUnit::TestAudioUnitKernel::Process(Float32 const* inSourceP, Float32 * inDestP, UInt32 inFramesToProcess, UInt32 inNumChannels, bool & ioSilence) {
    if (!ioSilence) {
        const Float32 *sourceP = inSourceP;
...


But at the end of the loop, I was incrementing sourceP. So as far as I understand, I was essentially downsampling everything by the buffer size (512), by not incrementing the value that I was getting the source from.

And for debugging, I found that if I have Xcode launch AU Lab, it will break at breakpoints, etc. I followed the steps here for that:
http://sample-hold.com/2011/11/23/create-a-fft-analyzer-part-iv-debugging-our-audio-unit-with-au-lab/

I am not sure where printf() statements are going, but I should be able to find the console when I need it. In the meantime, the breakpoints and being able to inspect variables that way is almost more helpful.

I am curious which wave editor you are using. I would like to automate some sort of process so that I can build and run and it will automatically run against a particular audio file and show me the before and after waveforms. Is there a lightweight application that will help me do that?

Thanks for your help,
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

References: 
 >Why is this audio unit producing a distorted sound (From: Simon Haycock <email@hidden>)
 >Re: Why is this audio unit producing a distorted sound (From: Chaim Peck <email@hidden>)
 >Re: Why is this audio unit producing a distorted sound (From: Simon Haycock <email@hidden>)
 >Re: Why is this audio unit producing a distorted sound (From: Chaim Peck <email@hidden>)

  • Prev by Date: Re: Why is this audio unit producing a distorted sound
  • Next by Date: AUGraph no sound with interleaved format
  • Previous by thread: Re: Why is this audio unit producing a distorted sound
  • Next by thread: AUSampler Parameters modified with Midi Messages (???)
  • Index(es):
    • Date
    • Thread