mumblekit
mumblekit copied to clipboard
Audio crackling when building for arm64 arch
Hi, we're trying to build MumbleKit in our product using the new $(ARCHS_STANDARD) of Xcode 5.1 (that includes also arm64). With this setup there is a lot of crackling coming out from the device speaker after the MKAudio starts, even if I'm alone in a channel and not talking with anyone. We tried using different codecs (CELT, speex, etc.) but it doesn't depend on that.
Have you ever faced this issue in your tests?
MumbleKit is really only tested with ARCHS = armv7. That is also what Mumble for iOS currently uses in the App Store.
Presumably, armv7s should work OK, too!
I'm pretty sure arm64 doesn't work. There are a few NSInteger <-> int (and similar) conversions throughout the code. Those need to be fixed.
My strategy with the conversions will be:
- Fix NSLog statements. Quite a few of the conversion errors happen due to using the Foundation NS(U)Integer types in NSLog statements with %i and %u. I will move to explicitly casting to 'unsigned long' and 'long' to fix these.
- Various external APIs we use want plain old C types, but we use the NS(U)Integer types in our MKAudio classes. I will need to go through these one by one, and manually vet their use to ensure we don't overflow the ints and whatnot that the C APIs expect.
Also, the config.h files for codec libraries might also need to be updated to reflect changes in sizes of various types, and potentially other things as well.
I plan on doing some work to bring us closer this weekend. I'll keep this bug updated with my progress.
Yeah, I confirm that with armv7s everything seems to work. Let me know if you need some help.
Thanks!
Hi @emiliopavia,
Can you try the current Git master? I've committed my arm64 fixes, and can't seem reproduce the crackling...
Hi @mkrautz,
I'm still having the problem but ONLY when running on my iPad Air (that is arm64). In the iPod Touch (armv7s) it seems to work, and it didn't before your latest commits (in the sense that I had the crackling on that too).
If I can do something to investigate deeper the issue, please let me know.
Thanks.
I can try on an iPad Air. I have only tested on an iPhone 5s. I checked that the universal binary had an arm64 component to it, but I'm not sure if it was actually used.
Hi @mkrautz,
any update on this?
Hi @mkrautz,
finally we were able to identify this issue: it's in the comfort noise setting. When enabled in 64bit CPUs it produces a noise that is not so comfortable... ;) Setting comfortNoiseLevel to 0 prevents the audio crackling.