#include<windows.h>
#include <iostream>
#include <tchar.h>
#include "mmsystem.h"//导入声音头文件
#pragma comment(lib,"winmm.lib")//导入声音头文件库
#include<stdio.h>
using namespace std;
void PlayMp3(int num ,char* pName = NULL) ;
//3个全局变量
MCI_OPEN_PARMS mciOpen;
MCI_PLAY_PARMS mciPlay;
MCIERROR mciError; //返回正常
int main()
{
inta=1;
while(1)
{
if(1 == a)
{
PlayMp3(1,(char *)_T("c:\\Kelly Breakaway Because of you.mp3")) ;
}
if(2 == a)
{ //播放
PlayMp3(MCI_PLAY) ;
//PlaySound((LPCWSTR)(_T("c:\\test.wav")),NULL,SND_FILENAME | SND_ASYNC | SND_LOOP);
}
if(3 == a)
{ //暂停
PlayMp3(MCI_PAUSE) ;
}
if(4 == a)
{ //停止
PlayM