I’m really new to fmod and I’m trying to write a simple windows program to play an mp3 file. When I try to run the program I get no sound. I was wondering if anyone has a simple program like this or knew where I could find one.
- tier_jah asked 14 years ago
Well see, that is all I have in my program and yet I get no sound.
Here is what my code currently looks like:
int Game_Init(void *parms)
// this function is where you do all the initialization
// for your game
int channel = 0;
// start up DirectDraw (replace the parms as you desire)
DDraw_Init(WINDOW_WIDTH, WINDOW_HEIGHT, WINDOW_BPP, WINDOWED_APP);
// initialize directinput
// acquire the keyboard
// add calls to acquire other directinput devices here…
//initialize the fmod api
FSOUND_Init(44100, 32, FSOUND_INIT_GLOBALFOCUS))
//load the song (SONG is a #define for the name of the song)
stream = FSOUND_Stream_Open(SONG, FSOUND_NORMAL | FSOUND_2D | FSOUND_LOOP_NORMAL, 0, 0);
//play the song
channel = FSOUND_Stream_Play(FSOUND_FREE, stream);
// hide the mouse
// seed random number generator
// return success
} // end Game_Init
Please login first to submit.