PlaySound()
проигрывает вместо .wav файла стандартный системный звук. Вот листинг функции, где она используется:
void Scene1()
{
if(SelectNumber == 1) //Rock
cout << "You played Rock and Computer played Rock. It's Draw ;|" << endl;
else if(SelectNumber == 2) //Paper
{
cout << "You played Paper and Computer played Rock. Paper covers a Rock. You WIN ;)" << endl;
LPWSTR win = L"D:\c++_progs\testing\Release\winsound.wav";
PlaySound(win,NULL,SND_ASYNC);
}
else if(SelectNumber == 3) //Scissors
{
cout << "You played Scissors and Computer played Rock. Rock smashes Scissors. You Lose ;(" << endl;
LPWSTR lose = L"D:\c++_progs\testing\Release\losesound.wav";
PlaySound(lose,NULL,SND_ASYNC);
}
Сама
PlaySound()
:
LPWSTR win = L"D:\c++_progs\testing\Release\winsound.wav";
PlaySound(win,NULL,SND_ASYNC);
Winmm.lib подключал, пробовал раньше на других проектах - работала. Сейчас делаю что-то не то.