Why Would it not?It means it is not finding your main function.
Why Would it not?It means it is not finding your main function.
There is the obvious reason - you don’t have one. Or it could be something simple like your makefile does not see your source file where main is defined. Or perhaps you do not have the signature for main specified correctly.Why Would it not?
Ok, I do have the main function, and the program compiled just fine, before trying to add pp2d.There is the obvious reason - you don’t have one. Or it could be something simple like your makefile does not see your source file where main is defined. Or perhaps you do not have the signature for main specified correctly.
I think this can also happen if you are using an old makefile and specify the wrong float model.Ok, I do have the main function, and the program compiled just fine, before trying to add pp2d.
Yes, I did, but it didn't work.I think this can also happen if you are using an old makefile and specify the wrong float model.
On a separate note - did you trying cleaning the project first?
Now it can't seem to find citro3d, even though it is installed correctly.Yes, I did, but it didn't work.
What do you mean by old makefile?
--------------------- MERGED ---------------------------
ok, looks like i just spelled source wrong in the makefile
You either don’t have citro3d installed correctly or you didn’t add it correctly to your library reference in the makefile. Hard to tell with no specifics.Yes, I did, but it didn't work.
What do you mean by old makefile?
--------------------- MERGED ---------------------------
ok, looks like i just spelled source wrong in the makefile
--------------------- MERGED ---------------------------
Now it can't seem to find citro3d, even though it is installed correctly.
The citro3d files appear in the libctru folder in the Devkitpro folder, so I don't see where the problem is.You either don’t have citro3d installed correctly or you didn’t add it correctly to your library reference in the makefile. Hard to tell with no specifics.
Is pp2d compiled as a library? If so make sure that appears before citro3d in your library list as it depends on citro3d.The citro3d files appear in the libctru folder in the Devkitpro folder, so I don't see where the problem is.
Also, it gives me errors saying "undefined reference to" And then a citro3d command
Sorry, I was away from my computer, I couldn't give an error at that time. But now, it works just fine, with no changes for some reason...Is pp2d compiled as a library? If so make sure that appears before citro3d in your library list as it depends on citro3d.
It could also be that pp2d relies on an older or a newer version of citro3d. It is hard to help in a meaningful way when you do not include error messages.
Use the examples that are installed in the devkitpro directory. The 3ds audio examples should be enough to get you started.How do I add SFX to my game? I'm not a very advanced coder so if I ask what certain things are or mean bear with me. I tried using some of the code from Smealums Portal3DS but it seems to be outdated for the current ctrulib and I can't figure it out for some reason.
The examples just play flat tones. I want to be able to use my own wav/mp3 files.Use the examples that are installed in the devkitpro directory. The 3ds audio examples should be enough to get you started.
The examples show how to use the 3ds hardware to play audio samples and the streaming example shows how to continuously fill an audio buffer in discreet chunks. For mp3 decoding you will need a library to do the decode - there is one in portlibs. Or you could just search for ctrmus.The examples just play flat tones. I want to be able to use my own wav/mp3 files.
Did you even try searching?If it makes things easier I can use wav instead of mp3. Also I don't know what an audio buffer is, and I have only the smallest idea of what a sample is. So yeah...
Okay so it looks like an audio buffer is like a keyboard buffer, in the sense that the instructions are fed to it, and it reads them when it's ready, so it can have a lot in the buffer, or nothing in the buffer. And a chunk is just a block of data. I still don't understand what's going on in the streaming example, there's a lot going on. Do at least have any way to section it out or a way for me to find out what each thing does in the code?The examples show how to use the 3ds hardware to play audio samples and the streaming example shows how to continuously fill an audio buffer in discreet chunks. For mp3 decoding you will need a library to do the decode - there is one in portlibs. Or you could just search for ctrmus.
You are getting closer - you need to build a replacement function for fill_buffer that will load wav samples from a wav file to fill the audioBuffer. And before you do that you need to parse the wav file to read the audio format (rate, channels, sample size) and find the start of the sample data and the number of samples.Okay so it looks like an audio buffer is like a keyboard buffer, in the sense that the instructions are fed to it, and it reads them when it's ready, so it can have a lot in the buffer, or nothing in the buffer. And a chunk is just a block of data. I still don't understand what's going on in the streaming example, there's a lot going on. Do at least have any way to section it out or a way for me to find out what each thing does in the code?
EDIT:
So this is on line 77:
fill_buffer(audioBuffer,stream_offset, SAMPLESPERBUF * 2, notefreq[note]);
I'm going to assume I need to replace notefreq with something to play a wav file correct?
If so, how would I do that?
So a while after I posted that I looked into someone else's code (OpenSyobon3DS) for how they handled audio (they technically got the code from Smealums Portal3DS, the difference being that theirs actually worked as I imagine Smealum hasn't worked on that in a while), which I had previously been looking at but to no avail. But after messing around for a while and really just putting a bunch of debug code everywhere to see what was and wasn't happening I did get it to work.You are getting closer - you need to build a replacement function for fill_buffer that will load wav samples from a wav file to fill the audioBuffer. And before you do that you need to parse the wav file to read the audio format (rate, channels, sample size) and find the start of the sample data and the number of samples.
There are probably a lot of example for how to do this if you search for it. You could even search for the example I already told you about