要先去http://billor.chsh.chc.edu.tw/sound/rain.htm找想要的音檔
在去把程式碼修改一下,還有Bulit optio就可以完成音效了
程式碼:
///#include <iostream>
///using namespace std;
#include <windows.h>
#include <mmsystem.h>
int main()
{
PlaySoundA("C:\\Users\\user\\Downloads\\lightning.wav", NULL, SND_SYNC);
return 0;
}
程式碼:
///#include <iostream>
///using namespace std;
#include <windows.h>
#include <mmsystem.h>
int main()
{
PlaySoundA("C:\\Users\\user\\Downloads\\lightning.wav", NULL, SND_SYNC);
return 0;
}
一樣要先載freeglut
在改一下程式碼
配合數字鍵1.2.3.4.5可以彈出DO.RE.MI.FA.SO


沒有留言:
張貼留言