I am busy making a reverb algorithm. While working with QSound
I found a few problems.
First, the sound doesn't play while trying the QSound::play()
like this:
/// Play output .wav file.
QSound sound("C:/Users/mvdelft/Documents/Reverb_configurator/output.wav", this);
sound.play();
It only plays the sound if I give the path againt with the QSound::play
(QString
file) like this:
/// 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");
A related problem I have has to do with the function bool QSound::isFinshed()
which doesn't work for me. Code:
/// 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