QSound::isFinished() not working
I'm using Windows to play a sound using QSound. It plays fine but I need some method for the program to halt until the sound stops.
Naturally I tried using the isfinished function but it always returns true:
Code:
aa.play();
qDebug()<< aa.isFinished();
The sound lasts 10 seconds but the finished call returns true instantly. What is happening here?
Is there another way of doing what I want to achieve?
Re: QSound::isFinished() not working
Read the docs Luke, read the docs...
Quote:
Originally Posted by QSound::isFinished() docs
Warning: On Windows this function always returns true for unlooped sounds.
Re: QSound::isFinished() not working
Well, forgive me my impetuosity, but shouldn't it be fixed?
Re: QSound::isFinished() not working
Quote:
Originally Posted by
tom989
Well, forgive me my impetuosity, but shouldn't it be fixed?
Be my guest, fix it :)