Thread: Fmod and windows programming

  1. #1
    Registered User AtomRiot's Avatar
    Join Date
    Jan 2003

    Fmod and windows programming

    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:
        CFmod mySong;                //inits fmod
        if(!mySong.Init(SONG_NAME))  //loads song
            exit(1);                 //exits if song not loaded
            mySong.PlaySong();       //plays the song
            UINT msg = MessageBox (0, "" , "", 0 + MB_ICONHAND);
            while(msg!=IDOK){}       //waits till ok is pressed 
        }                            //then stops song
    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
    All Your Base Are Still Belong to Someone!!!
    And you Remember that!!!

  2. #2
    Registered User
    Join Date
    Dec 2002
    I'm new to windows programming but I know you probably need use threads. Hope this helps.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Windows function for mp3 files?
    By Leeman_s in forum Windows Programming
    Replies: 4
    Last Post: 06-03-2003, 06:00 PM