c++播放wav
c++播放wav
在visual studio下:
#include<iostream>
#include<windows.h>
#include<Mmsystem.h>
#pragma comment(lib,"winmm.lib")
using namespace std;
int main()
{
PlaySound(TEXT("C:/Users/Amazing/Desktop/456.wav"), NULL, SND_FILENAME | SND_ASYNC);
cin.get();
cin.get();
return 0;
}
在dev下: