mumblekit
mumblekit copied to clipboard
Mistake around AudioUnitRender
Hi, I found maybe there is a mistake in this line. (nframes/dev->_micSampleSize)
should be (nframes * dev->_micSampleSize)
https://github.com/mumble-voip/mumblekit/blob/6ec99df6310673997a60805e2a10a5f06248c3a7/src/MKVoiceProcessingDevice.m#L56
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
I faced the same issue, here is the pull request: https://github.com/mumble-voip/mumblekit/pull/44