Homebrew Playing Audio Files Using libctru(NDSP) in C?

AdamFX990

Confused Humanoid
OP
Member
Joined
Jan 22, 2017
Messages
238
Trophies
0
Age
29
Location
Santraginus V
XP
359
Country
United Kingdom
Heyya fellas!

I've been having a lot of fun making small programs for my 3DS. But one thing I've run into a problem with is playing audio files. I have a decoder which I borrowed from ctrmus. But ctrmus relies on some additional libraries which I'd rather not have to use if possible for the sake of portability.

The other code I've been looking at borrowing from is 3ds-vgmstream. Unfortunately, that is written in C++. But it uses a library called NDSP, which I've been reading through the documentation for and it seems like the sort of library I'm after, but I can't seem to import it into my C code and I can't see any reason why I shouldn't be able to looking through the documentation.

Of course, I could just write my program in C++, which I might. But I much prefer functional programming to OO programming. I guess I can do c++ functionally, but I'm imagining some OO fans would have a heart attack if they saw such a thing :gun:. Also, all my other programs are written in C. If I want to combine then in to one super-epic-mega program of doom, then I'd need to port them all over to C++ and that's effort.

If any of you guys have messed around with any homebrew that plays audio files, then please show me what you got! :D
 

MaK11-12

Well-Known Member
Member
Joined
Jul 26, 2009
Messages
241
Trophies
0
Location
Namek
Website
www.deltabeard.com
XP
434
Country
What kind of portability issues would arise with using a library? ctrmus uses libraries which supports different architectures, but that isn't really required because ctrmus is only targeting the 3DS.

Give me a shout if you need help with ctrmus.
 

AdamFX990

Confused Humanoid
OP
Member
Joined
Jan 22, 2017
Messages
238
Trophies
0
Age
29
Location
Santraginus V
XP
359
Country
United Kingdom
What kind of portability issues would arise with using a library? ctrmus uses libraries which supports different architectures, but that isn't really required because ctrmus is only targeting the 3DS.
Give me a shout if you need help with ctrmus.
The libraries in question aren't open source. I don't really fancy the idea of adding lots of non-free dependencies because of the obvious headaches that would bring to anyone wanting to maintain the code (including myself, as I work on as many as four different computers). If you have any recommendations for either Open source libraries that I could use or of anyway I could do this in C using ctrmus then that'd be a fantastic help to me. Thanks for the reply! :)
 

MaK11-12

Well-Known Member
Member
Joined
Jul 26, 2009
Messages
241
Trophies
0
Location
Namek
Website
www.deltabeard.com
XP
434
Country
The libraries in question aren't open source. I don't really fancy the idea of adding lots of non-free dependencies because of the obvious headaches that would bring to anyone wanting to maintain the code (including myself, as I work on as many as four different computers). If you have any recommendations for either Open source libraries that I could use or of anyway I could do this in C using ctrmus then that'd be a fantastic help to me. Thanks for the reply! :)
All the libraries that ctrmus use are open source.

Edit: dr_flac is public domain, libopus is BSD-like licence, and mpg123 is LGPL.
 
Last edited by MaK11-12,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    also gonna install twilight menu in my r4 flashcard
  • Psionic Roshambo @ Psionic Roshambo:
    One thing that just occurred to me.... The sound on the 2600 sucked less back then the harsh sound we hear now is from infinitely better speakers we have now, back when the 2600 was new speakers produced a almost muffled sound, like CRTs made old graphics look slightly better.
  • Psionic Roshambo @ Psionic Roshambo:
    I wonder if I could recommend that to some emulation devs that perhaps the sound could use some smoothing out to simulate those old TVs
  • Psionic Roshambo @ Psionic Roshambo:
    I think a few of the early systems could benefit from that, at least up to the 8 bit generation, by the 16 bit generation I think TVs had gotten a lot better in almost every way
  • Xdqwerty @ Xdqwerty:
    i dont have an sd card adapter but I have an usb sd card adapter
  • K3Nv2 @ K3Nv2:
    Old people games
  • Xdqwerty @ Xdqwerty:
    its not the one that comes with the r4
  • Xdqwerty @ Xdqwerty:
    doesnt work (my flashcard is from r4isdhc.com)
  • Xdqwerty @ Xdqwerty:
    might install ysmenu first
  • Psionic Roshambo @ Psionic Roshambo:
    Try Wood firmware
  • Psionic Roshambo @ Psionic Roshambo:
    For your R4
  • Psionic Roshambo @ Psionic Roshambo:
    It's old but it's the best firmware out for DS stuff
  • Xdqwerty @ Xdqwerty:
    it says it only works for the original R4, R4i Gold (r4ids.cn), R4iDSN (r4idsn.com) and Acekard R.P.G.
  • Xdqwerty @ Xdqwerty:
    nvm it does support mine
  • Xdqwerty @ Xdqwerty:
    but why choose it over ysmenu @Psionic Roshambo?
  • Xdqwerty @ Xdqwerty:
    bc im stupid?
  • Xdqwerty @ Xdqwerty:
    yea ik im stupid
  • Xdqwerty @ Xdqwerty:
    good night
  • Psionic Roshambo @ Psionic Roshambo:
    Just give it a try, but honestly if you have a 3DS you can play DS games without a card just off the internal SD card
  • Psionic Roshambo @ Psionic Roshambo:
    Slightly slower loading but a bit more convenient
  • BakerMan @ BakerMan:
    guys, my fuckin headphones have an out of place speaker
  • K3Nv2 @ K3Nv2:
    Did you try wearing them?
    K3Nv2 @ K3Nv2: https://youtube.com/shorts/eJV6GaIEgd4?si=ciLPnlhfd7XcrxQn