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

Audio crackling when building for arm64 arch #25

Open
emiliopavia opened this issue Apr 6, 2014 · 7 comments
Open

Audio crackling when building for arm64 arch #25

emiliopavia opened this issue Apr 6, 2014 · 7 comments

Comments

@emiliopavia
Copy link
Contributor

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?

@mkrautz
Copy link
Contributor

mkrautz commented Apr 6, 2014

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:

  1. 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.
  2. 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.

@emiliopavia
Copy link
Contributor Author

Yeah, I confirm that with armv7s everything seems to work. Let me know if you need some help.

Thanks!

@mkrautz
Copy link
Contributor

mkrautz commented Apr 6, 2014

Hi @emiliopavia,

Can you try the current Git master? I've committed my arm64 fixes, and can't seem reproduce the crackling...

@emiliopavia
Copy link
Contributor Author

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.

@mkrautz
Copy link
Contributor

mkrautz commented Apr 7, 2014

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.

@emiliopavia
Copy link
Contributor Author

Hi @mkrautz,

any update on this?

@emiliopavia
Copy link
Contributor Author

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.

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