複習上週進度
外掛:#include <mmsystem.h>
函式:(1) PlaySound("bubbs.wav",NULL,SND_ASYNC); ///不同步
(2) PlaySound("bubbs.wav",NULL,SND_SYNC); ///同步
本週進度
讓MP3檔可以撥放
1.先更改工作目錄 working_dir(變成".")


2.下載外掛 CMP3_MCI.h
3.輸入:#include "CMP3_MCI.h"
4.宣告變數 CMP3_MCI myMP3;
-------------------------------------------------------------------------------------------------
放在main()內
5.載入 myMP3.Load("123.mp3");
5.撥放 myMP3.Play();
計時器
建立新函式 void timer(int t)
void timer(int t){
glutTimerFunc(2000, timer, 0); ///等待時間, 函式, 參數
PlaySound("Shot.wav", NULL, SND_ASYNC);
}
讓MP3檔可以撥放
1.先更改工作目錄 working_dir(變成".")
2.下載外掛 CMP3_MCI.h
3.輸入:#include "CMP3_MCI.h"
4.宣告變數 CMP3_MCI myMP3;
-------------------------------------------------------------------------------------------------
放在main()內
5.載入 myMP3.Load("123.mp3");
5.撥放 myMP3.Play();
計時器
建立新函式 void timer(int t)
void timer(int t){
glutTimerFunc(2000, timer, 0); ///等待時間, 函式, 參數
PlaySound("Shot.wav", NULL, SND_ASYNC);
}
沒有留言:
張貼留言