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
    Psionic Roshambo @ Psionic Roshambo: https://www.youtube.com/watch?v=4N-3vv4kzdk