IOS sound problems since iOS 9.2

Bugs will be moved here once resolved.

Post » Tue Feb 16, 2016 12:20 pm

I tested an iPad Air 2. Does anyone else have one to test and does it definitely not reproduce on that? iOS devices tend to be pretty consistent so deviations like this tend to be unusual.
Scirra Founder
B
383
S
225
G
86
Posts: 24,118
Reputation: 190,544

Post » Tue Feb 16, 2016 2:18 pm

Ashley wrote:I tested an iPad Air 2. Does anyone else have one to test and does it definitely not reproduce on that? iOS devices tend to be pretty consistent so deviations like this tend to be unusual.


@Ashley Not tested it personally but here's what one of my testers had to say: "Get the buzzing sound on iPhone 5 you mentioned and no music. 9.01. iPad air 2 is fine and noticed it's running 8.0.2"

The iPad air 2 mentioned is only running iOS 8.0.2 which doesn't make it an ideal test. I've also tested it on an old iPad mini with iOS 9.2 and the bug isn't happening. It really does look like an iPhone only issue.

Are you able to get hold of an iPhone to test this on?
B
27
S
4
Posts: 154
Reputation: 1,975

Post » Wed Feb 17, 2016 1:11 am

It's a bit weird with the recent iOS, if you test your game and it plays music, you can see it in the AirDrop menu, the exactly folder & music file name is displayed.

I think Apple is doing some funky stuff, if it detects Safari playing audio it somehow separates it to it's main audio player for other purposes.

The thing is our wrappers are Safari based and iOS is treating it like a website and not a standalone app.
B
68
S
24
G
19
Posts: 1,755
Reputation: 17,553

Post » Wed Feb 17, 2016 10:27 am

Message: shortwave can only post plain text URLS until they have 500 rep. 2 URLS modified. Why?
I have been getting exactly the same problem since iOS 8 on my iPhone and both test iPads (3 and Air 2). I'm trying to figure out a reliable way of reproducing it but it is quite random. If I spend a full day working on an app I will probably have to restart my iPad once or twice to fix it.

@Ashley I found a discussion on stack overflow which might be of help. The last post seems to be a fix for the problem, definitely looks like it is related to a sample rate mis-match.

http://stackoverflow.com /questions/17892345/ webkit-audio-distorts-on-ios-6-iphone-5-first-time-after-power-cycling /34501159#34501159

This is also interesting http://stackoverflow.com /questions/29901577 /distorted-audio-in-ios-7-1- with-webaudio-api

Had to put spaces in the links because it wouldn't let me post them otherwise.
B
6
S
1
Posts: 50
Reputation: 500

Post » Wed Feb 17, 2016 11:58 am

@shortwave - those are interesting links - it sounds like it's an iOS bug that has been around for a while, and it definitely sounds like it's something to do with iOS changing the sampling rate as mentioned earlier in the thread:

I believe the issue is caused due to resetting the audioContext.sampleRate prop, which seem to happen after the browser/OS plays something recorded in a different sampling rate.


I noticed that if you play a video using a <video> tag, it sets the context.sampleRate value to whatever the video's audio was encoded at. It seems as if iOS Safari has one global sampleRate that it uses for everything...

This global sample rate appears to persist across page loads and is shared between tabs and browser instances. So, playing a youtube video in another tab could break all your decoded audio.


So under some circumstances iOS ends up playing audio buffers at the wrong sample rate, which probably corrupts the audio and sounds distorted.

I think this confirms it's an iOS bug and not something wrong with our own code, so the best we could do from here is figure out a reliable way to reproduce it and forward it to Apple. I think the repro will look something like:

1. Open a C2 project in Safari which plays some audio at 44.1KHz
2. Close Safari
3. Open something else that plays audio at a different sample rate, e.g. 48KHz
4. Close that and go back to Safari
5. See if the audio is distorted

However as per usual in bug reports, we need absolute specifics for every step. So I think it's just a matter of finding something reliable for step 3 (e.g. a youtube video or something public and reliable like that).

I've looked at some of the workarounds and they look very difficult - they say things like "just recreate the AudioContext", but in our engine that would mean tearing down and rebuilding the entire audio routing graph, and possibly re-decoding audio buffers. That's complicated and we have no code to cover that right now since normally there's no need to ever do that, and implementing it is enough new code that it is likely to cause as many problems as it solves (as already happened recently with an Android audio bug, and that was much simpler!) Other workarounds like "just play an audio buffer at this frequency" don't make sense, because it's already doing that when you play a new sound when coming back, but it still sounds distorted.

The good news is I think this should have limited impact - it seems unlikely it will affect everyone, it's just certain combinations of playing something else in between Safari.
Scirra Founder
B
383
S
225
G
86
Posts: 24,118
Reputation: 190,544

Post » Thu Feb 18, 2016 5:11 am

@Ashley, i created this thread. Have you tried my original repro (post #1)?
I can repro this consistently, meaning if i try it 100 times, it repros 100 times on my iphone 6.
From your posting, it appears that you do not own iphone, only ipad.
As you stated, the issue probably is in how iOS broke contract, but it is surprising that Construct team doesn't own a single iphone and therefore can't verify the simple repro steps.
The cheapest paid license cost $100 and people generally look for better support (at least try the repro on the device where people say the issue is occuring) when they pay such money for a software.

My repro does not involve playing sound in another app as stated in my repro steps (page 1)

For now, i had to turn off sound entirely on my iOS game and it is really lame.
B
5
S
1
Posts: 32
Reputation: 439

Post » Thu Feb 18, 2016 5:58 am

well said @kimtaein1
Scirra Ltd trying to be a professional company, but all this looks very amateur. They do not have an iPhone....well.. seriously?

I don't understand why they ignoring us. Us, who really are able to pay for the Scirra software.
For example, I might pay a monthly fee if all work correctly and I can producing a quality games. Scirra Ltd activity does not seem very professional. This is not a business.
B
4
S
1
Posts: 49
Reputation: 452

Post » Thu Feb 18, 2016 12:36 pm

Hi,
any solution about this problem ?
because converting sound to lower khz giving bad quality sound
B
43
S
16
G
8
Posts: 783
Reputation: 8,238

Post » Fri Feb 19, 2016 10:54 am

I can't release my game because of this. This is disgusting....
Working on "EVERBLAST"
Image
B
30
S
6
Posts: 217
Reputation: 2,804

Post » Fri Feb 19, 2016 11:19 am

Ashley wrote:The good news is I think this should have limited impact - it seems unlikely it will affect everyone, it's just certain combinations of playing something else in between Safari.


Yep, because that iPhone thing never took off...

What happens when apple call this a feature?
B
27
S
4
Posts: 154
Reputation: 1,975

PreviousNext

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests