Skip to content

Instantly share code, notes, and snippets.

@thinkhy
Created January 16, 2011 14:56
Show Gist options
  • Save thinkhy/781853 to your computer and use it in GitHub Desktop.
Save thinkhy/781853 to your computer and use it in GitHub Desktop.
Windows播放Wave声音的代码
#pragma comment(lib, "winmm.lib")
// call example
// 支持绝对路径和相对路径
::PlaySound(strSoundFile.c_str(), NULL, SND_ASYNC|SND_NOWAIT|SND_FILENAME);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment