mp3 support

edited September 2011 in General discussions
Hi,
I am writing to ask whether mp3 audio playback is supported in orx, and if not will it be added in the future?

Thanks in advance for your reply,
Keep up the great work!

Comments

  • edited September 2011
    Hi liamkjaer and welcome here!

    Mp3 is natively supported by orx on iPhone/iPad but not on Windows/Linux/mac OS X.
    Unfortunately there's no plan to support mp3 directly in orx for those platforms due to software patent issues.

    An option for someone that needs mp3 support would be to use their own code and/or a 3rd party library to decode the mp3 files and then feed orx with their content.
    For sound samples (SFX), simply creating the samples from the data in memory and for the streams (musics), filling the packets on the fly when receiving the event orxSOUND_EVENT_PACKET.

    So even if the support can't be in orx itself, doing things this way is still very easy to do and only requires a handful of lines of code. :)

    And thanks for your appreciation!

    Cheers!

    PS: I didn't mention Android as I'm not aware of what's available but Lydesik should be able to give more details about it. That or I'll check the code. ;)
  • edited September 2011
    Wow thank you for the super fast reply!
    Arguably better support than gamebryo and unity forums! xD haha

    That's exactly what i needed to know thank you. I'd also be very interested to hear about the android platform regarding mp3 support as I am developing for iOS and android concurrently.

    For now I'll just stick with .wav and .ogg as they are totally adequate.

    Thanks again!
  • edited September 2011
    Ahah, my pleasure. Not sure the support will be that fast if we get a community as large as theirs. :)

    It looks like the native version of Android supports at least OGG, not sure for the rest. Lydesik really is the man that can help you with that.

    One last thing, right now OGG isn't supported on iOS as they don't provided a hardware-accelerated decoder for it, but for the sake of convenience I'll probably add a software version as it's annoying during development time to have to use mp3 on iOS and ogg on computer. I'll add a performance warning though, so that people don't get bad surprises.

    If you want to use a format that's supported for both computers and iOS, you can either use WAV or CAF.

    Or you can simply have OGG files on the computer and MP3 for iOs and use 2 different config files to specify the audio resources. :)
  • edited September 2011
    Excellent! I wasn't aware iOS didn't support .ogg.

    I'm not scheduled to test that for a while either - you might have just saved me a headache! xD

    Looks like I'll stick to wav for the minute, Thanks again!
  • edited September 2011
    Yeah, I'm not sure why they don't support ogg when they support a bunch of exotic formats no one use anymore.

    What I usually do is develop on computer and only try on device when I need to test things like multi-touch. Even accelerometer can be emulated using a joystick. :)
  • edited September 2011
    If you sync the latest version on svn, there's now support for ogg/vorbis for the iOS version, which means, along with .wav, it's now the only format supported across all platforms. :)
  • edited September 2011
    mp3 should works with android (orx support any file the default android MediaPlayer can play)
Sign In or Register to comment.