Also, the music runs slower than normal during the first few seconds while the DC is loading the file -- can the music be preloaded to avoid this?
Code: Select all
snd_stream_init();
sndoggvorbis_init();
sndoggvorbis_start("/cd/music.ogg", 0);
while(1)
{
//display some text on the screen here
}
sndoggvorbis_stop();
sndoggvorbis_shutdown();
snd_stream_shutdown();
I'm also having problems getting sound effects to work. I can't even get my test program for that to compile, because gcc keeps throwing "'sfx_hnd_t' undeclared" and other such errors, even when I try #include <dc/sound/sfxmgr.h>. I probably have to add something to my makefile, I would guess.
The sfxmgr.h comments don't really explain too much about how the functions work. I'm assuming multiple sound effects can play simultaneously (up to some limit). I also wonder how the volume and panning parameters for snd_sfx_play() work -- what the maximum and minimum values are. I'm guessing volume would go from 0 to 255. I'm not sure about panning, though.
Please bear with me; I haven't worked with sound in my programming before, even on the PC. Thank you for your time!