Audio distortion and pitch problems on iPad

0 favourites
  • 4 posts
From the Asset Store
100+ Musical High Quality Sound Effects for your game!
  • 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

  • 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.

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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"!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)