int flags = SND_FILENAME|SND_ASYNC; if (loops == -1) flags |= SND_LOOP; PlaySound((wchar_t*)filename.utf16(), 0, flags);
//=================================================================================================void MainWnd::extractSoundFiles(){ // extract WAV-files from resource QDir srcDir(":/sounds"); QDir dstDir; const QString dirName(srcDir.dirName()); if (!dstDir.exists(dirName)) dstDir.mkdir(dirName); dstDir.cd(dirName); foreach (const QString & fileName, srcDir.entryList(QDir::Files | QDir::Hidden | QDir::NoSymLinks)) { const QString dstName(dstDir.absoluteFilePath(fileName)); if (!QFile::exists(dstName)) { QFile::copy(srcDir.absoluteFilePath(fileName), dstName); } }}
C++ (Qt)while(!asleep()) sheep++;