We have an app, that uses AudioKit to record sound from the microphone and to playback it directly to your headphones.
If you connect your headphones to an iPhone 8+ after you started the app, it starts to crackle at the end of every recorded audioframe. If you do the same thing on every device older than iPhone 7 the app will work correctly.
If you plugged in the headphones before starting the app, it will work correctly in all scenarios, also if you plug in or plug off your headphones.
For better analysis I built a test-app, which only includes the audio-related functions.
This test-app behaves exactly like the other app.
We really have to fix this issue, because we have customers depending on the feature.
Any help in fixing this would be highly appreciated. AudioKit-version is 4.1.
We setup a github repository where you can checkout the code:
https://github.com/eskarion/audio-test
Thanks in advance!
Related
I am looking for a way of play an audio file and have it as input for the iOS simulator microphone. I am creating a bunch of UI tests for an iOS app that uses dictation (speech-to-text) and I didn't find a way of doing it using applications like SoundFlower, etc as I want to run in the CI and bypassing Apple's security Gatekeeper is not possible as I can't run the machine in recovery mode.
I want to launch the app as an UI test and send some audio to the "device microphone" as a way of triggering a wakeword. Mocking the code here is not an option, or better, not what we want, otherwise we won't test anything.
I was wondering if I can use AudioKit to do this.
I don't think AudioKit will help you with this. I would have thought Soundflower could do it, but you could also try Rogue Amoeba's Loopback if you haven't already.
The iOS simulator does inherit audio from the host Mac, so you could try an old school solution of physically attaching a cable to the microphone input from the output.
So I've just finished building a clients app and all was good. The app worked seamlessly on both mine and the clients phone. However the clients partner tried it on an iPhone 5s and audio did not play. I then tried running the app on an alternative iPhone 5s as oppose to the client's partners (6s) and it works fine.
I think the problem is their phone however maybe I'm wrong - although audio in safari works fine for them.
I am using a standard web view but don't know why it's just their phone. Are there any reasons maybe a specific device wouldn't allow sound in the app?
Thanks.
I am developing an app to do live video streaming and when I recently upgraded to an iPhone 6s, all noise going through the microphone sounds robotic (or like a cricket). I can reproduce this issue only using the skype app, but no other app have this similar output. The skype support forums say that this is a problem they're seeing on iPhone 6s [1] but don't give any details as to what's causing it.
The interesting thing is it doesn't have issues when I use the microphone jack via my headphones, only when the built in microphone is used. Is there a permission or a change I need to make to my app to fix this?
[1] - http://community.skype.com/t5/iOS-iPhone-and-iPad/iPhone-6s-Distorted-sound/td-p/4138308
The 6S is apparently locked to a 48000 sample rate when using the built in microphone. Maybe you tried to set the format to 44100. I think the only way to deal with this is to query an active AVAudioSession for it's sampleRate property and set your format's sample rate to that.
This is a know issue consumer users are seeing. It might be the iOS 9 update was not working properly.
Here's a source (might not be that trusted for some but it's a start)
http://9to5mac.com/2015/09/30/iphone-6s-touch-id-3d-touch-speaker-power-issues/
You can try a different app from the App Store, or call someone on speaker, to check if the issues is reproducible.
I have an audio app that plays for many hours throughout the night. Sometimes the iPhone changes routes and says the speaker is no longer available and stops playing audio. I'm not sure why but my theory is that it tried to connect to a Bluetooth device. I get the following in the log:
AVAudioSessionRouteChangeReasonCategoryChange
AVAudioSessionRouteChangeReasonOldDeviceUnavailable
And since the old device is no longer available it stops the audio. I'm playing audio through the iPhone speaker, so I'm not sure why the speaker would no longer be be available.
My question is what can I do to prevent this from happening in code? I advise people to turn on Airplane mode or disable Bluetooth which always fixes the issue. I'm wondering if something could be done in code to help solve this problem.
I'm writing mobile application with Adobe AIR. The application use AIR Microphone API to record sound to file and later replay it.
The problem manifest only on mobile devices, not simulator. Specifically only on iOS devices, android devices seem to work OK.
Sometimes the recorded sound is missing samples. I know this because I use iFunBox to copy the recorded file to another application that replay it. The dropped frame manifest during playback as very fast audio because only part of the samples were recorded.
Sometime the playback is to slow which manifest as very slow audio. I know this because when the recording is fine and the other application play the sound right or when I take a file I recorded in the simulator (which run on my MacBook) and it only play slow on the mobile device.
How can I make sure the sound is good even when the application is a bit busy?
I've built the application as ad-hoc package and install it on iPad using TestFlight and now everything seem to work just fine.
I guess during debug Adobe AIR did not manage to fill the sound buffer fast enough and cause the distortion.