[WIP] 3ds-vgmstream new audio player (port of vgmstream)

Discussion in '3DS - Homebrew Development and Emulators' started by TricksterGuy, Feb 5, 2016.

  1. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    3ds-vgmstream
    v0.1.2
    by TricksterGuy
    About
    This is a port of the vgmstream library for the 3ds. vgmstream is a library for playing a wide variety of streamed audio formats used in video games. As of now this app has a textual interface, though I may plan a better interface and more playback features later.

    Usage
    see download link below.
    1. Copy the files in the archive to your sd card.
    2. Place any music files you want (see tested formats) in the music folder on the root of the sd card.
    When you open the app in homebrew launcher you will be presented to a lame textual interface where you can select your music using UP and DOWN.

    Press A to play the selected file.
    Once it is playing press B to stop it and then you can choose a different file to play.
    Press START to exit the app.

    Tested filetypes
    To see complete status for support of file types see this. If the file format is not listed there then vgmstream does not support it.

    Note that while vgmstream itself does support a heck of a lot of file types (see above link) Tweaks to the library may have to be made to get it to play on the 3ds.

    If you find a format that doesn't work (known list here) I would like for you to report it here

    Roadmap
    For now I would like to get all of the formats working. If you have a feature request you can add it here. I will address such feature requests in my own free time however (best effort).

    Other
    Well I wrote this just for fun as an experiment cross compiling things for the 3ds. I was surprised when I finally got it working, after a few more headaches trying to get vgmstream to load a file off the sd card from the 3ds.

    I'm also not really a sound programmer, but I did have previous experience updating the plugin for audacious (a cross platform music player similar to winamp) for vgmstream.

    Links
    github: https://github.com/TricksterGuy/3ds-vgmstream
    download: https://github.com/TricksterGuy/3ds-vgmstream/releases
     
    Last edited by TricksterGuy, Feb 7, 2016
    Coto, Konno Ryo, LarBob and 14 others like this.


  2. hobbledehoy899

    hobbledehoy899 Conniption Master

    Member
    2,570
    3,969
    Nov 13, 2015
    United States
    linux-zen
    Could you do a .CIA build?
     
    Games&Stuff and SLiV3R like this.
  3. ihaveamac

    ihaveamac GBAtemp Guru

    Member
    5,339
    5,752
    Apr 20, 2015
    United States
    Tigard, OR
    just tried a bcstm I took from Professor Layton vs. Phoenix Wright romfs and it seems to work for the most part :D there's some popping and stuff but good so far.

    one thing I've noticed is that, if I add more songs to the folder than will fit on screen, then my selection won't be shown on the screen if it's at the top. scr_22_TOP_LEFT.png
     
  4. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    Sure I see instructions on the wiki, I'll provide one by the end of the weekend if its not too bad of a process.

    Great I'll add that to the list


    [​IMG]

    Lets see if I can quick fix this before I retire for the night. If not I'll have it fixed this afternoon.
     
    ihaveamac likes this.
  5. hippy dave

    hippy dave Butts Butts Megabutts

    Member
    2,568
    1,791
    Apr 30, 2012
    Looks interesting, keep it up :) If you're getting popping in playback you might be better off trying dsp instead of csnd.
     
    clank likes this.
  6. SLiV3R

    SLiV3R 3DS Friend Code: 0473-9069-2206

    Member
    2,162
    1,026
    Jan 9, 2006
    I have been waiting for something like this. Some formats I would like to see support for:

    Nsf
    Sid
    Mod
    Xm

    — Posts automatically merged - Please don't double post! —

    None of my favourite formats seems to be supported :(

    This is very cool anyway! :)
     
    TinchoX likes this.
  7. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,673
    Sep 1, 2010
    Oh this is neat. I'll have to nab this and give it a try.
     
  8. Technicmaster0

    Technicmaster0 GBAtemp Addict

    Member
    2,998
    602
    Oct 22, 2011
    Gambia, The
    It would be great if this homebrew could read the files directly from romfs.
     
  9. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    Update stayed up much longer than I should have now, but fixed a number of amateur issues that snuck itself into the code...

    Yeah my hearing is probably bad I hear no popping on anything I play

    though I am testing on a new 3ds. I should test it with my original 3ds.

    Here is my stance on file formats for now.

    if your file type doesn't appear in https://github.com/kode54/vgmstream then its beyond the scope of my project for now.

    After I support all of the ones vgmstream uses. I may look into others no promises.

    Thanks, be sure to grab the newly updated 0.1.1 version which I uploaded moments ago.

    By this do you mean the romfs files exacted via braindump?

    If you provide a pointer to documentation on reading from romfs I may look into it later, though no promises. Still pretty fresh with all of this stuff!


    Anyway I am going to bed now, I have work in the morning and its already 2:30am.
    Any new issues or new file formats found to be working will be updated this afternoon.
     
    hippy dave and SLiV3R like this.
  10. Technicmaster0

    Technicmaster0 GBAtemp Addict

    Member
    2,998
    602
    Oct 22, 2011
    Gambia, The
    I mean that you should be able to stream the music of a game directly from the original game. Last time I checked you couldn't access romfs easily.
     
  11. david_keen

    david_keen Member

    Newcomer
    25
    2
    Jun 30, 2015
    could this work with mca files?
     
  12. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    I see. I would like to keep this application simple and just read music files directly from the sd card for now.
    Would be a good idea for another app though.

    It seems that it is
    https://github.com/kode54/vgmstream doesn't have the list of all formats supported on the main page.
    But a code search reveals it is supported.

    I do not have any music in the format to test which so if it works let me know!


    All I have rebuilt the application. It seems I distributed a debug build for v0.1 and v0.1.1
    Program is now 60% smaller and should run a little faster
     
  13. A_Random_Guy

    A_Random_Guy Officially That Dev

    Member
    862
    459
    May 22, 2015
    Malaysia
    Smea's closet
    Tried porting this awesome player to CIA. Crashes after install but after restart it works fine. Nooby at this so it currently have a black icon and no name :P

    EDIT: Closing the software also crashes the system. Unless someone can made a better banner and icon and a working RSF. I can probably make newer and working version of the CIA

    EDIT 2: Pressing Start to exit works! Use that instead of shutting down the software. Currently finding a way to make the Home Button unresponsive
     

    Attached Files:

    • CIA.7z
      File size:
      524.3 KB
      Views:
      63
    Last edited by A_Random_Guy, Feb 7, 2016
  14. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    Thanks, though I would much prefer a solution that can be integrated in the Makefile as a target, so I can build it the same time I build the 3dsx.

    I'm sure something like this would be very convenient for everyone else and I will add the solution to my 3ds-template repo https://github.com/TricksterGuy/3ds-template

    I am open to pull requests.
     
  15. A_Random_Guy

    A_Random_Guy Officially That Dev

    Member
    862
    459
    May 22, 2015
    Malaysia
    Smea's closet
    The build itself is buggy. Until someone made a better version of the CIA where it doesn't crash, i will remove my link. You could try asking devs that knows how to build CIA files. They could help you :P
     
  16. C02

    C02 GBAtemp Regular

    Member
    234
    13
    Sep 15, 2015
    United States
    does this support .mp3?
     
    Sachi likes this.
  17. TricksterGuy
    OP

    TricksterGuy Advanced Member

    Newcomer
    79
    103
    Jan 16, 2016
    United States
    California
    After some more research. Yes and No. I played an mca file on my desktop and got a couple that was very static (and my volume was on full blast :/). A couple did sound pretty good, but it wasn't perfect.
    So from what I have read and heard, apparently there are different types of files following the mca format and vgmstream doesn't support all of the them.


    No it doesn't sorry.


    Reminder to anyone who is wonders "does this support X?" there is a list of all formats supported here
    If it has not been tested please try it and report to me.

    That said I tested samples of all of the file types I could find on my computer and the above link reflects that.
     
    SLiV3R and Games&Stuff like this.
  18. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,673
    Sep 1, 2010
    Just so you know, BFWAV == FWAV, just as BRSTM == RSTM. There's probably a few more, but all that's different is the file extension. They're the exact same file format.
     
  19. froggestspirit

    froggestspirit D/P/Pt Demix Guy

    Member
    1,061
    524
    Jul 28, 2011
    United States
    These formats are sequenced. They would require implementing an emulator to play them, which might be found in something like droidsound-e (cant remember if it's open source). I think this is nice, but seeing some sequenced formats like USF, and 2SF would be awesome, though it'd be quite some work
     
  20. loco365

    loco365 GBAtemp Guru

    Member
    5,458
    2,673
    Sep 1, 2010
    Droidsound-e is open-sourced, but it uses different libraries for those formats. It'd be nice to have this as a 3DS version of DSE though.
     
    SLiV3R and froggestspirit like this.