[Solution] : no-lag audio SFX on ios

  • Question: Where do you input step 3? Is that in contruct 2 or Audacity?

    The file wont open for some reason. I get an error it that the file couldn't be verified and I click allow then the option to open it comes up and I click it but nothing happens.

  • i am using audio sprite 2 example for my game and works fine.

    only issue is when i lock the device the full audio sprite plays continuously.....

    any idea pls any suggestions asap.....

  • I tried this method and it lowers the fps of my game, making me think that it's a little taxing for the browser.

    If you are using PhoneGap this is the best method for audio as it uses the internal iPhone audio library.

    scirra.com/tutorials/283/phonegap-low-latency-audio

  • Is there a way to get it working on both iOS HTML5 and Android HTML5?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sogen : that kind of solution isn't needed anymore on iOS, since there's WebAudio API available.

  • Sorry for late reply Pode, just wanted to confirm that sound on iOS works great :)

  • Is this still the best/only solution? I'd like to know before going through the motions

  • Centra - no, it's completely out of date. This thread was posted before iOS supported the web audio API, which enables polyphonic low-latency audio playback. Audio should work just fine without any modification in the latest versions of iOS.

  • Hey hey hey, hold on just a second....!!

    You mean if I don't go through all that I can't have a normal game with background music and other sounds on iPads/iPhones with older versions of iOS?!

    And even if I do it I will only be able to play a single sound at a time?!(what if the player hits something with the background music playing...)

    Cmon I thought apple was supposed to be "top dog" in the mobile market, specially considering how much their devices cost...

  • VIKINGS,

    Yes, afaik older iOS browser only support 1 channel audio so we must choose to play sfx or music (not possible to playing both), for sfx we must create audio sprites (all sfx sound embeded on single sound file) and also audio need trigger from user (touch) to playing it (can't autoplay).

  • Wooow... Well then I'll optimize my game for newer versions and just put a disclaimer in the menu saying something like "Sorry mate, old iOS limitations, you'll only get music, tough luck."(I'll proly phrase it in a bit more sensible way, I'm just kinda pissed at the moment after finding out about all this...)

    Olso, the way you replied brings me back to another question I have, which I asked in another post, but I'll paste? it here too, get a quicker answer and will olso help future people asking themselves the same thing in case they won't stumble onto the other post.

    I see you guys use the word browser a lot, saying stuff like "a Construct 2 game is not an application - it's a browser-based type of thing" and "Use the Browser's plugin "Close" action."

    But I plan to use CocoonJS to make an iOS game with it, that people can download of the appstore... woudln't that be a standalone app, they would still play it in a browser?

  • Yes because Construct 2 produces HTML5 game just like HTML that used by website, the difference is Construct 2 using extensively HTML5 component called Canvas that used for displaying 2d graphics so all games produced by Construct 2 can be played using any web browser if that browser support HTML5 standard.

    CocoonJS using special custom game engine (not browser engine) that can read javascript code and Canvas HTML5 code that produced by Construct 2 and displaying it to screen using native code so yes it will be a standalone app with speed that near native app performance :)

  • Interesting, very interesting, thank you.

    I guess that leaves just two more questions then. Starting with which iOS version do I have to worry about 1 audio channel? And how do I create a "Quit Game" button after all...?

    I mean, yeah, the guys that play it in browsers can proly just close the tab(not sure if that saves the game state though...) and be done with it. Or I could use a on clicked>browser>close event to make a quit game button for them.

    But what about the people that download it from the app store and run it on their device as a native app, how do they close the game?

  • Bump.

  • Sorry,

    but this forum changes make many my forum link references broken! <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">(

    usually i refer this link for info about iOS audio problems (may be it iOS 4.x and 5.x but i don't have any iOS devices to confirm about that, sorry)

    http://www.scirra.com/forum/solution-no ... page1.html

    Yes, you can use Browser Object > Close event, it's works with CocoonJS and NodeWebkit too <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

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