Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AEAudioUnitModuleProcess doubles the gain of mono buffers #44

Open
jackpal opened this issue Oct 10, 2016 · 0 comments
Open

AEAudioUnitModuleProcess doubles the gain of mono buffers #44

jackpal opened this issue Oct 10, 2016 · 0 comments

Comments

@jackpal
Copy link
Contributor

jackpal commented Oct 10, 2016

I was using mono buffers to debug an AEAudioUnitModule, and I noticed that my output buffers had double the amplitude of my input buffers. (e.g. if my input samples were 1.0 peak-to-peak the output samples are 2.0 peak-to-peak.)

I think this is because AEAudioUnitModuleProcess is hard-coded to create a stereo buffer in line 141 "// Get a buffer with 2 channels". This stereo buffer is initialized with two copies of the original data, and later on output stereo buffers are combined back into a single mono buffer. As a result the amplitude of the samples gets doubled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant