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

Mistake around AudioUnitRender #40

Open
huxingyi opened this issue Aug 15, 2015 · 1 comment
Open

Mistake around AudioUnitRender #40

huxingyi opened this issue Aug 15, 2015 · 1 comment

Comments

@huxingyi
Copy link

Hi, I found maybe there is a mistake in this line. (nframes/dev->_micSampleSize) should be (nframes * dev->_micSampleSize)

if (dev->_buflist.mBuffers->mDataByteSize < (nframes/dev->_micSampleSize)) {

And as figured out in the follow line, AudioUnitRender will change the value of AudioBufferList's mDataByteSize (I verified this in a real iphone 4, not on simulator), so we need to keep the mDataByteSize and restore it after AudioUnitRender.
https://github.com/openframeworks/openFrameworks/blob/076daef1236dabadde935b8276120650b5f29cda/addons/ofxiOS/src/sound/SoundInputStream.m#L51

@emiliopavia
Copy link
Contributor

I faced the same issue, here is the pull request: #44

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

2 participants