mumblekit icon indicating copy to clipboard operation
mumblekit copied to clipboard

Mistake around AudioUnitRender

Open huxingyi opened this issue 9 years ago • 1 comments

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

huxingyi avatar Aug 15 '15 09:08 huxingyi

I faced the same issue, here is the pull request: https://github.com/mumble-voip/mumblekit/pull/44

emiliopavia avatar Nov 26 '15 10:11 emiliopavia