I was wondering if anyone had any ideas how to let a song play once you clicked a button, i am using the fmod libraries and have a button set up to play the song but when i click it, i have to somehow pause the entire thing to let the song play, here is what i mean:
Code:
case IDC_BUTTON_PLAY:
{
CFmod mySong; //inits fmod
if(!mySong.Init(SONG_NAME)) //loads song
exit(1); //exits if song not loaded
else
{
mySong.PlaySong(); //plays the song
UINT msg = MessageBox (0, "" , "", 0 + MB_ICONHAND);
while(msg!=IDOK){} //waits till ok is pressed
} //then stops song
break;
}
as of right now, it plays until you click ok on the message box but i wanted to make it so that the program could still be used while the program is playing. right now if the while loop was not in there then the song would not even play but i need it to play without pausing the program and i would have a button set up to stop it if necessary. any input would be great and also to let you know, i am not just trying to make another lame mp3 player to distribute, it is for a school sports team and should only have the ability to play specific songs for each buttons