Homebrew sound and music?

Discussion in '3DS - Homebrew Development and Emulators' started by 3DSmax, Aug 2, 2016.

  1. 3DSmax
    OP

    3DSmax Newbie

    Newcomer
    4
    0
    Aug 2, 2016
    United States
    I see LPP-3DS is a library that supports sound, but all of the samples are in Lua. I have done a lot of digging and I haven't found any C/C++ libraries where I can write code in C/C++ to load .ogg files as sounds and music and play them in homebrew applications, unless there is a way to use LPP-3DS without doing all the code in Lua scripts?

    Can anyone please offer suggestions on how to do this? Or if there are any functioning examples, that would be even more helpful, since I don't have a very keen understanding of sound.

    Thank you!
     
  2. The Real Jdbye

    The Real Jdbye Always Remember 30/07/08

    Member
    GBAtemp Patron
    The Real Jdbye is a Patron of GBAtemp and is helping us stay independent!

    Our Patreon
    12,087
    5,163
    Mar 17, 2010
    Norway
    Alola
    You can use the sound code from the lpp-3ds source.
     
  3. 3DSmax
    OP

    3DSmax Newbie

    Newcomer
    4
    0
    Aug 2, 2016
    United States
    Thank you for such a quick response! :) I have been looking into that and it is at least a little straightforward, so that is good. Please excuse me for being a n00b, but can you or anyone please offer input on this?:
    Code:
    test = Sound.openWav("/blood.wav", false)
    I think this is utilizing this function:
    Code:
    static int lua_openwav(lua_State *L)
    I'm not sure what is going on here? Two arguments are somehow being smashed into one argument? It looks like this may require modifying LPP-3DS to have C/C++ type names rather than ones related to Lua.

    The sample I am referencing: https://github.com/Rinnegatamante/lpp-3ds/blob/master/samples/Multimedia/wav.lua