Any Android developmers here?

Discussion in 'Game Development (Technical)' started by Jamie W, Aug 28, 2012.

  1. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    If so, what do you use to play music, from c/c++ (am using the NDK / JNI thingy).
     
  2. Applewood

    Moderator Original Member Indie Author

    Joined:
    Jul 29, 2004
    Messages:
    3,859
    Likes Received:
    2
    Open SL. The java thing leaks memory like nobody's business.
     
  3. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    I had a look at OpenSL, was a bit put off because it isn't available on Froyo. Which is like 20% market share, I think.

    Was that a concern for you guys?
     
  4. Applewood

    Moderator Original Member Indie Author

    Joined:
    Jul 29, 2004
    Messages:
    3,859
    Likes Received:
    2
    Nope, Android has enough quirks and problems and anything that old won't run our games well in the first place.

    GLWG used the java thing until opensl came out and we switched immediately. Thus cutting off a bunch of whining about the game crashing due to all the memory leakage that wasn't our fault. Of all the shit things about Android dev, sound is probably the worst.

    Your options are basically:

    Open SL - doesn't work on older phones
    Java - doesn't work on anything after 30 minutes running time (in our case)
    Silence.
     
    #4 Applewood, Aug 28, 2012
    Last edited: Aug 28, 2012
  5. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    Thanks Paul.

    I'd like to add a forth option, OpenAL. Which I already have compiled from source and seems to work perfectly, my sound manager is pretty much identical to my iOS version. Haven't really tested for memory leaks though.

    OpenAL works on < 2.3, but the problem for me, is not having music. I'd really need to get music working and reliable on < 2.3, for it to be worth my while to use OpenAL in the first place.

    If I can't get reliable and efficient sound and music on < 2.3. I guess OpenSL is the way to go. It probably is anyway; my only concern is losing out on 2.2 sales.

    2.2 market share is currently 15.5% Not sure that would equate to 15.5% of sales though, imagine a lot of older phone are not used so much by gamers. Plus, as you point out, will handsets running 2.2 be beefy enough to run at decent frame rates?
     
  6. Applewood

    Moderator Original Member Indie Author

    Joined:
    Jul 29, 2004
    Messages:
    3,859
    Likes Received:
    2
    Sorry, forgot about that one. We found it to be buggy as hell a while back and in any case is just a convenient wrapper over the other options iirc. We have our own platform agnostic stuff already so didn't need it. I find the less 3rd party code you put in an Android game, the less head scratching you'll have when it don't work. lol
     
  7. Jamie W

    Original Member Indie Author

    Joined:
    Apr 16, 2006
    Messages:
    1,211
    Likes Received:
    0
    Yeah, think I share the 3rd party code aversion! Just thought of something else, did you get any latency issues using OpenSL?
     
  8. Applewood

    Moderator Original Member Indie Author

    Joined:
    Jul 29, 2004
    Messages:
    3,859
    Likes Received:
    2
    Nothing anyone has noticed. It's really not a bad solution if you can stand losing those housebrick phones.
     

Share This Page

  • About Indie Gamer

    When the original Dexterity Forums closed in 2004, Indie Gamer was born and a diverse community has grown out of a passion for creating great games. Here you will find over 10 years of in-depth discussion on game design, the business of game development, and marketing/sales. Indie Gamer also provides a friendly place to meet up with other Developers, Artists, Composers and Writers.
  • Buy us a beer!

    Indie Gamer is delicately held together by a single poor bastard who thankfully gets help from various community volunteers. If you frequent this site or have found value in something you've learned here, help keep the site running by donating a few dollars (for beer of course)!

    Sure, I'll Buy You a Beer