Audio distortion and pitch problems on iPad

Bugs will be moved here once resolved.

Post » Fri Jun 10, 2016 9:26 pm

Problem Description
Audio playback is distorted or pitch is reproduced incorrectly when running on iPad Air 2.

Attach a Capx
h*t*t*p://w*w*w.dropbox.com/s/ia6bebnrrm7eurn/Audio%20Test.capx?dl=0

Description of Capx
Button plays a sample which should be middle C (261Hz), two text displays; current sample rate and sample rate at start of layout.

Steps to Reproduce Bug
  • Run the project on an iPad or compile an iOS app
  • Press button

Observed Result
Button plays a sample which should be middle C (261Hz), upon repeatedly refreshing the project, it will usually start with a correct sample rate of 44.1kHz, the sound is played back almost (not exactly) an octave lower than it should be. Either that or very distorted. Sometimes (about 10% of the time) the page will load with a sample rate of 22kHz and the sound will play correctly. The audio file is 44.1kHz and works fine on iPhones.

The problem persists after app is compiled with Cordova CLI, XDK or Phonegap. I am finding it impossible to make an iPad app because of this.

Expected Result
Sound should play correctly.

Affected Browsers
  • Safari on mobile
  • Phonegap
  • Cordova CLI
  • Intel XDK

Operating System and Service Pack
Windows 10

Construct 2 Version ID
r227
B
6
S
1
Posts: 50
Reputation: 500

Post » Mon Jun 13, 2016 1:07 pm

@Ashley Haven't you got an iPad Air 2 as one of your test devices? If you get 5 mins spare could you please check if the audio is working correctly on it?

At the moment any new project I create is unable to play audio correctly on an iPad, all other devices are fine.
B
6
S
1
Posts: 50
Reputation: 500

Post » Mon Jun 20, 2016 4:02 pm

We have an iPad Air 2 running iOS 9.3.2, and I tried your demo in the Safari browser as it's the most convenient way to test. I refreshed 10 times and it worked fine every time. I also tried switching tabs and going to the home screen and returning, it always worked fine.

What version of iOS is your iPad running? This sounds almost exactly like a past sample-rate/audio distortion bug we had with iOS. The bug was actually in iOS and not C2, so we could not directly fix it, but we found a workaround (which should be in place in r227) and reported the underlying issue to Apple. Apple fixed the underlying issue but I don't know if it's actually made it to the release versions of iOS, or if it has, which version it went in to.

I'd add it's odd you use "is touching" followed by "trigger once" - that's the same as "on touched", and we have special provisions for the first "on touch" event that do things like unblock audio to work around iOS's restrictions. This is applied regardless of which events you have in C2, but I thought I'd mention it in case it does somehow affect it.
Scirra Founder
B
395
S
233
G
88
Posts: 24,376
Reputation: 193,842

Post » Tue Jun 21, 2016 3:47 pm

@Ashley Just thought I'd let you know that I restored my iPad and the problem is completely fixed. Very strange as it was 9.3.2 before so shouldn't be any different, maybe when iOS update happens there are underlying files which aren't changed? Anyway thanks for the help, I'll change those "is touching" events to "on touched"!
B
6
S
1
Posts: 50
Reputation: 500


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests