在 C++ 中播放波形文件时,程序不再执行任何其他操作。通常,您必须等待曲目完成然后程序才能继续,但我正在播放循环曲目,我需要它在程序执行时播放。有没有办法做到这一点?谢谢。
PlaySound("sleep_away.wav", NULL, SND_FILENAME|SND_LOOP);
cout << "x1" << endl;
cin >> x1;
cout << "y1" << endl;
cin >> y1;
cout << "x2" << endl;
cin >> x2;
cout << "y2" << endl;
cin >> y2;
double f = slope (x1,y1,x2,y2);
cout << "y = " << m << "x + " << yi << endl;