shortwave's Recent Forum Activity

  • Still having problems with this. I'm sure it's my fault though! At the moment this is the process I do:

    • Create cordova project

    • Add iOS platform

    • Add plugins:

    crosswalk-webview

    wkwebview-engine

    file

    httpd

    whitelist

    inappbrowser

    • Build project

    • Run with Xcode, it's always worked fine with uiwebview, but wkwebview always just gives me the black screen.

    I'm using CLI 6.2.0

    Should i take the config.xml file out of the www folder and put it in the main project folder before building? I've tried it both ways.

  • I've been using Cordova CLI to build my apps up until now, but lately I've realised I can seem to get WKWebView working.

    When I tick the option to use WKWebView, then run it in Xcode, I can see that it is still using UIWebView. I've tried adding the WK plugin with Cordova, also the file and http plugins. If I add the WK engine plugin, the app runs in WK mode but all I get is a black screen.

    Is it only possible to use Phonegap at the moment? I've tried to have a look around but I can't find a guide to using WKWebView anywhere apart from the r224 release notes, does anyone know if there's something I could read that would help?

  • Hi Tim, I was in exactly the same position until last week. It turned out that it was actually my iPad. I did a full restore and the problem disappeared.

    Very strange as I was on iOS 9.3.2 before and after the restore. Maybe you could try the same on your test devices to see if it helps?

  • 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"!

  • Hmmm I'm starting to think it's just me! I've posted a .capx to the bugs section. I think I've followed the guidelines correctly.

    It's just a button that should play a middle c, on my iPad Air it plays at the correct pitch about 10% of the time at the moment....

  • Hi Ashley, it's iOS 9.3.2

  • Hi Ashley thanks for getting back to me. I don't know then, maybe it's just something wrong with my iPad? It does seem to be fine on my iPhone. I'm using an iPad Air 2 and any audio files I attempt to play are coming out almost an octave lower, and using audio.samplerate I can see the project sometimes starts in 22.5kHz (wrong but sound works ok) or 44.1kHz (correct but distorted). I've checked all my audio files are good and tried lots of different formats and sample rates.

    I'm using r227 but I also tried r229 to see if it helped, I've also posted a capx to the bug section. I'll try to get hold of a friends iPad to double check, maybe it's just my one.

  • Currently it seems that iOS 9 has some serious problems with HTML5 audio (and therefore Construct 2). I personally can't release anything I've been working on lately because of the distortion / sample-rate mismatch problems. I understand that it's not specifically a Construct problem. Current issues include:

    • Audio not working after a video has been played on the device.

    • Audiocontext starting in different sample rates randomly

    • Sounds playing an octave lower than intended due to sample rate

    • Sample rate mismatch resulting in horrible distortion of sounds

    • Sound not working after an app is closed / opened

    I know that Ashely said this a few months ago:

    "I am guessing this is just another case of the same iOS bug, and playing the video also causes a sample rate change. Apple have apparently fixed the underlying issue so hopefully it's fixed in the next iOS update.

    I don't want to add any more hacks to try to work around this: the hacks tend to be so ugly they cause as many problems as they solve, which is exactly what's happened with some other recent sound bugs as well."

    Does anyone think it's likely that iOS 10 will make all this stuff better? If so I'll take a few months off developing and continue with Construct, if not I'm going to need to start learning a non HTML5 based engine. I'm sure lots of other people are in the same position.

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

  • 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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Is anyone else still experiencing problems with this? I seemed fine for a while after Ashley posted the fix, but has now come back even worse than before.

    I'm using r227 and the audio is very distorted 2 out of 3 times I run my app. It is the same testing on browser and publishing with xdk and phonegap. I'm testing using an iPad air 2. I've tried importing audio files at various sample rates.

    I've also made a test app with just one button and one audio file and it still has the same problem.

  • Ashley Yes I do see your point. Usually music based apps ignore the ringer-mute switch, Garageband for example. In fact pretty much every musical app, also apps like Youtube, and anything based on playing videos or music, podcasts etc. It's actually quite a standard behaviour. I suppose the reasoning is that you wouldn't be playing an on-screen piano if you didn't want to make a noise...

    I get an email probably 2-3 times a week from users asking why the sound doesn't work on my app, and I have to reply with the default "turn the mute switch off" email. As this is the normal behaviour for an app, I think users get confused when it acts differently.

shortwave's avatar

shortwave

Member since 28 Aug, 2014

None one is following shortwave yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies