一个超简单的MP3播放(转)
没有想到还有这么简单的MP3播放,原来以为用FMOD已经很简单了,原来还有更简单的.
这是从gameres,看到的, 来自 shaoxiaoning
#include <windows.h>
#include <vfw.h>
#include <stdio.h>
#pragma comment(lib,"vfw32.lib")
int main(int argc, char* argv[])
{
HWND hWnd;
hWnd = MCIWndCreate(NULL,NULL,0,TEXT("f:\\azxyq.mp3"));
MCIWndPlay(hWnd);
char c;
while(c!='q')
{
scanf("%c",&c);
}
return 0;
}
#include <vfw.h>
#include <stdio.h>
#pragma comment(lib,"vfw32.lib")
int main(int argc, char* argv[])
{
HWND hWnd;
hWnd = MCIWndCreate(NULL,NULL,0,TEXT("f:\\azxyq.mp3"));
MCIWndPlay(hWnd);
char c;
while(c!='q')
{
scanf("%c",&c);
}
return 0;
}