Documentation Bug Report

edited March 2013

There's an error in a code sample on this page:

http://theamazingaudioengine.com/doc/_filtering.html

The incorrect sample:

AudioUnitSetParameter(_reverb.audioUnit,
                      kAudioUnitScope_Global,
                      0,
                      kReverb2Param_DryWetMix,
                      100.f,
                      0);

The order of the arguments is not correct. Here is the corrected version that does work in my code:

AudioUnitSetParameter(_reverb.audioUnit,
                      kReverb2Param_DryWetMix,
                      kAudioUnitScope_Global,
                      0,
                      100.f,
                      0);

Here's the reference from Xcode:

AudioUnitSetParameter(AudioUnit inUnit,
                      AudioUnitParameterID inID,
                      AudioUnitScope inScope,
                      AudioUnitElement inElement,
                      AudioUnitParameterValue inValue,
                      UInt32 inBufferOffsetInFrames)

Please let me know if there is a better way to submit issues like this.

Thanks,

-Eric

Comments

  • Ah, thank you very much, Eric! Oddly, I'd made the same mistake in the sample app code and it worked fine - must be by fluke =)

    All corrected.

    Reporting here's fine - you can also do a pull request via github, if you like.

  • The value of kReverb2Param_DryWetMix is zero. You transposed two values that were both zero so it worked. It was when I tried to use a different param that I found the problem.

    Is the source of the HTML documentation part of the github source somewhere I'm missing? I'd be happy to fork and submit pull requests if it was, I don't see it.

    Thanks,

    -Eric

  • Yeah, I figured that too =)

    It is indeed - you can find it all in the main header, TheAmazingAudioEngine.h

  • Yes, I also noticed that the reason why the sample is no error, the same attribute values。

Sign In or Register to comment.