2019年5月9日 星期四

week12_showshowshow的筆記

1.主題:鍵盤
2.主題:聲音,音樂
3.複習:街層TRT骨架
4.作業:能操控的機器人



(1)在網頁上下載wav檔 利用程式播放音樂
#include <windows.h>
///(3)因為一些基礎Window型別,要在mmsystem之前
#include <mmsystem.h>
///(1) Multimedia System裡面有聲音的函式


int main()
{
  PlaySoundA("C:\\Users\\user\\Desktop\\pup.wav",NULL,SND_SYNC);
  ///(2)播放聲音 Play Sound ASCII英文的檔名,......沒有人,SoundSync
}

///最後在執行時,專案的設定,要在link時,加入一個winmm的library










(2)另開一個GLUT專案 加入程式碼 利用鍵盤設定音樂






(3)加入CMP3_MCI.h 即可播放mp3檔和wma檔


沒有留言:

張貼留言