2015年5月21日 星期四

Week12

今天聽了鄭鎧尹博士的演講
並且學習如何撥放MP3檔案~~

程式碼如下:
#include <iostream>
#include <GL/glut.h>
#include "CMP3_MCI.h"
CMP3_MCI    myMP3;

using namespace std;

int main ()
{
    myMP3.Load("RickyMartin.mp3");
    myMP3.Play();
    cout<<"Hello world!" << endl;
    int a;
    cin>>a;
    return 0;

}


其中MP3的檔案要放在freeglut/bin裡面
CMP3_MCI.h要放在專案資料夾裡面


這樣就可以撥放MP3檔案摟!


沒有留言:

張貼留言