私はリバーブのアルゴリズムを作るのに忙しい。一緒に仕事をしてQSound
いるうちに、いくつかの問題が見つかりました。
QSound::play()
まず、次のようにしようとすると音が再生されません。
/// Play output .wav file.
QSound sound("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav", this);
sound.play();
QSound::play
次のように(QString
ファイル)でパスを再度指定した場合にのみ、サウンドが再生されます。
/// Play output .wav file.
QSound sound("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav", this);
sound.play("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav");
私が抱えている関連する問題は、機能bool QSound::isFinshed()
しない機能に関係しています。コード:
/// Play output .wav file.
QSound sound("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav", this);
sound.play("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav");
sound.setLoops(10);
/// Check is sound is finished
while (!sound.isFinished()){}
ui->listWidget->addItem("Finished playing sound");
}/// End of scope