audio sprites for iOS safari and mobile

0 favourites
  • 12 posts
From the Asset Store
Shark.io
$49 USD
Shark.io in the sea full of killer sharks, Sunday of life is the game. Who knows what is happening under the sea?
  • Anyone have a an audio sprites solution for C2 to make audio not so poor in iOS safari?

    Ashley, you building this into C2 any time soon?

    Edit by Ashley: audio sprites are no longer necessary with iOS 6, you do not need to use them any more.

  • faceyspacey : I did that http://www.scirra.com/forum/topic45993.html

    By the way, I saw your work on making the framework work with flash(canvas) on older IE, and I also think it can help to leverage HTML5 in situation where the machines are 'old' (I'm also working with education and teachers, and the setups are really outdated).

  • i'll check out your thread.

    ps. im about to try SoundManager2 instead of audio.js int the IE flash canvas solution. i think it will make the audio faster.

    ps. how did the Web Storage thing go for caching audio?

  • faceyspacey : I cache audio in WebStorage/LocalStorage as base64 string, and it loads back perfectly ;).

  • do you have any code to share for that? I'm about to implement your solution in the other thread? is the caching code the there cuz it didn't seem like at the time you had implemented.

  • faceyspacey : I don't have any code, because I'm not using C2 for that. I have a piece of Flash applet giving me a base64 audio string, and, in my index.html page, I do a simple

    localStorage['mp3File'] = audioMP3.src;

    to save the file (the .src being the base64 string), and I do just the opposite to load the file.

    If you don't have the base64 representation of your audio file, you need to prepare it before creating your game. There are several binary <-> base64 encoders online, like there : http://www.motobit.com/util/base64-decoder-encoder.asp

    Don't forget to have the right MIME type in front of your base64 string ! (Like

    "data:audio/ogg;base64,"

    for OGG)

  • Polyphonic audio is supported using PhoneGap, directCanvas or CocoonJS. So I would use one of them, but preferably not PhoneGap, because it's usually too slow.

  • I know about the solutions in the native wrappers. In this case, I'm actually not looking for polyphony, but simply no delays in audio playing in browsers on mobile phones, or at least in iOS safari.

    It would be nice to have Pode's solution part of your C2 build process.

    Pode, you available for hire? I'm on a very tight deadline of tomorrow. You want to help me with your audio sprites solution? Email me at jamesmep@faceyspacey.com. I PMed you, but I'm not sure you saw it.

  • Hello! Can you provide a cross-mobile platform play sound example? I can't save a sound in the webstorage to add offline support..

    I am using C2 and Direct Canvas for Iphone/Android..

    Thanks!

  • dusoft - this thread is out of date, since it was posted iOS 6 has been released with support for the Web Audio API, which makes audio sprites redundant.

  • Use the following software; Audacity + Lame + FFmpeg to build all formats for sound sprites if you plan on supporting older devices.

    I would look into Jukebox by Zynga.

    github.com/zynga/jukebox

    Need to prep the file for the different formats.

    .ac3

    .mp3

    .m4a

    .ogg

    .amr

    Hope this helps. SDK

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm locking this thread since people keep bumping it.

    Audio sprites are no longer necessary! This is an old post from May before iOS 6 was released with polyphonic audio support. There is no longer any reason to use audio sprites.

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