// play a wave file sound using the winmm library
// For DevCpp add the library libwinmm.a to linker via
// Project/Project Options/Parameters/Add Library
// remember this is a console program!#include <iostream>
#include <windows.h> // for PlaySound()#define SND_FILENAME 0x20000
#define SND_LOOP 8
#define SND_ASYNC 1using namespace std;
int main()
{
// play sound as loop (remove SND_LOOP for one time play)
// file boing.wav has be in the working directory
PlaySound("boing.wav",NULL,SND_FILENAME|SND_LOOP|SND_ASYNC);cin.get(); // wait
return 0;
}
i cant get this to work for an midi i have... can sumone code this to work for it? or possibly a while nnew code that works... heres the 1 i am using..
#include <iostream>
#include <windows.h> // for PlaySound()
#define SND_FILENAME 0x20000
#define SND_LOOP 8
#define SND_ASYNC 1
using namespace std;
int main()
{
// play sound as loop (remove SND_LOOP for one time play)
// file boing.wav has be in the working directory
PlaySound("ff7vict.wav",NULL,SND_FILENAME|SND_LOOP|SND_ASYNC);
cin.get(); // wait
return 0;
}