mars1985's Forum Posts

  • Ashley thanks for the feedback and idea - I am going to test this out later this week.

    Ashley I tested enabling play in background on the Audio properties which resolved the minimize bug where you minimize the the app or switch to the home screen that your app loses sound completely.

    The first run bug (no audio) is still an issues after converting the audio sample rates to 48000khz to resolve the audio distortion.

  • > Looks like if you use "touchend" the audio plays fine. Would it be possible to add this as an action in Construct like we have touchstart on an object?

    >

    We already made this change shortly after iOS 9 came out, so all current versions of C2 are already doing that.

    Ashley there isn't a on object "touchend" like there is for on object "touchstart"? Am I missing something?

    The current verision of Construct 2 only has "On any touch end" rather than "On object touchend". There isn't a way to pick an "object" with touchend currently.

    See image: http://picpaste.com/touch-Qnshj4nS.PNG

    On any touch end needs to be used with an object to be useful.

    Did you review the blog post I submitted using an iPhone with Safari to see how "touchstart" causes audio distortion where as "touchend" resolves this problem? http://www.williammalone.com/posts/ios- ... ile-issue/

    majesticAsFk do you have any thoughts on this - I know you are switching to Unity but does this sound like a plausible solution?

    rafaelfe thanks for the feedback - your game looks really great but kind of useless if you can't resolve the audio / sound problems! Have you considered Unity? I am not familiar with it but sounds like some Construct 2 iOS developers are moving to it.

  • majesticAsFk we have another thread going with a lot of people with the same problem. I've seen this problem posted about over and over without being seriously addressed. I guess if a dozen people start complaining about it then we may see some traction.

    We were able to resolve the audio distortion problem but now the audio won't run on the first run after install.

    Thanks for your feedback - I am looking to switch over to Unity - its unfortunate that this isn't more support for iOS with Construct 2. I really like how easy Construct 2 is to use but if I can't properly export it to iOS then its useless and a waste of time.

  • Ashley - I'm not sure if you saw this on the other thread related to the iOS audio issue but here it is again. I think its worth a look and test on an iPhone in Safari.

    If you open this link http://www.williammalone.com/posts/ios- ... ile-issue/ in an iPhone (I'm on a iPhone 6 running iOS 9.2)

    First "touchstart" audio is distorted but the other two methods are fine. Try that link out on an iPhone in Safari to reproduce the grainy audio.

    Looks like if you use "touchend" the audio plays fine. Would it be possible to add this as an action in Construct like we have touchstart on an object?

    kimtaein1 & It would seem everyone developing for iPhone / iOS 9 using Construct 2 / Cordova is facing this problem - this isn't the first thread I've seen here. I do think its strange I can't find this topic anywhere else on the web that's current except for Scirra forums. I'm glad this topic is finally getting some Construct 2 traction.

  • Ashley thanks for the feedback and idea - I am going to test this out later this week.

  • Thanks and FMFM - did either of you try using PhoneGap before? I've only use Intel XDK with cordova.

  • majesticAsFk can you post the .capx?

  • FMFM so I've built a game using Construct 2 with the expectation of exporting it for iOS but it appears there are to many limitations all revolving around audio for me to publish this game.

    The game is ready but the audio has a problem so I can't release it - the first time you install and run the game there is no audio!

    I will probably have to start over and use xCode / Swift 2 which will take much much longer to build.

    Are there any examples of users who have games on the iOS Apple Store using Construct 2 that have audio?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • and FMFM I may have solved the problem related to no App Sound on the first run.

    So this is my setup by the way.

    iPhone 6 iOS 9.2.1

    Construct 2

    Cordova Export

    Intel XDK

    Export project from construct 2 via Cordova

    Update the audio files in the export to be 48000Khz

    *Update the config.xml file to include the following lines which seem to resolve the first run with no sound problem for me.

    <preference name="AllowInlineMediaPlayback" value="true"/>

    <preference name="MediaPlaybackRequiresUserAction" value="false"/>

    **More information here: http://stackoverflow.com/questions/2676 ... onegap-app and https://cordova.apache.org/docs/en/late ... onfig.html

    Possible there are additional tags that may solve other audio problems.

    One problem that still remains is when you minimize the application you will lose all audio sound until you close the app completely and relaunch.

    UPDATE: this seem liked it worked but I tried it again a few times and its not working. :\</p>

  • I've found a fix, though it has a knock-on effect.

    The fix: Export for cordova like you usually would. Now go into the media folder and what you want to do is replace the existing audio with 48khz (sample rate) versions. How I did this was I fed all my audio through https://online-audio-converter.com/ (to change the sample rate you'll have to open up advanced settings).

    Now just build in the intel XDK, terminal or however you get it native on your iphone.

    The knock-on effect: I've found that on the first play or after the first play in some time, the music just turns into a faint but high pitched buzz. Upon rebooting the app it will all work normally, but as you would imagine this still isn't ideal.

    I have noticed that the "preload x" or "preloads complete" doesn't work on ios and I'm curious if this is something to do with it?

    Any ideas or suggestions would be great!

    So changing the sample rate to 48000khz fixed the audio problem but I had no sound on the FIRST run but anytime after I ran it the sound was fine. Why would it require the app to open and close one time before the sound would work and is there a work around for this like preload which doesn't seem to do anything.

    Thanks for discovering this - I wish Scirra would look into it a little harder.

  • To resolve this problem you need to follow these steps.

    1. Manually Add Third Party Plugin https://github.com/apache/cordova-plugin-inappbrowser

    2. Inside your Construct 2 export folder - edit the file called intelxdk.config.additions.xml and remove the or comment out this line:

    <intelxdk:plugin intelxdk:name="org.apache.cordova.inappbrowser" intelxdk:value="org.apache.cordova.inappbrowser" />

    3. Once you've done this remember to close and reopen XDK / upload the project again before trying to build.

    Works for me!

  • damjancd have you added audio to your project yet? I haven't been able to get my audio background music / sound effect to play properly on my iPhone 6 iOS 9.2 during export testing through Intel XDK.

  • Seems to be a lot of problems with the Audio Object.

    Background music is distorted when playing on iOS.

    Read more here:

    The audio bug after exporting from Construct 2 for iOS is the only thing holding me back from publishing my first project to the App Store.

  • I have the same problem with my background music specifically. Sometimes the sound effects also have issues.

    Checkout this blog post: http://www.williammalone.com/posts/ios- ... ile-issue/

    When I tested the sound in that link using my iPhone the first "touchstart" audio is distorted but the other two are fine. Try that link out on an iPhone to reproduce the grainy audio.

    Looks like if you use "touchend" the audio plays fine.

    I tried a lot of different ways in Construct 2 to fix this problem but none of them worked. I didn't see a way out of the box to fix this within Construct 2 without doing some manually coding.

  • Checkout this blog post: http://www.williammalone.com/posts/ios- ... ile-issue/

    When I tested the sound in that link using my iPhone the first "touchstart" audio is distorted but the other two are fine. Try that link out on an iPhone to reproduce the grainy audio.

    Looks like if you use "touchend" the audio plays fine.