Hi Folks,
this should prolly best be filed as bug - this code returns false:
The sound file can, however, be played with Phonon!Code:QFile file1(QDir::tempPath() + "/bgm.wav"); qDebug() << QDir::tempPath() + "/bgm.wav"; if (file1.open(QIODevice::ReadWrite)) { // file.fileName() returns the unique file name QFile workFile(":/sfx/rsc/music/bgm.wav"); if(workFile.open(QIODevice::ReadOnly)) { file1.write(workFile.readAll()); workFile.close(); } file1.close(); } qDebug() << QSound::isAvailable(); QSound::play(QDir::tempPath() + "/bgm.wav");

Reply With Quote

