PDA

View Full Version : QSound::isFinished() not working



tom989
4th January 2013, 22:10
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:



QSound aa ("dash300ms1.wav");

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?

wysota
4th January 2013, 22:37
Read the docs Luke, read the docs...

Warning: On Windows this function always returns true for unlooped sounds.

tom989
4th January 2013, 22:45
Well, forgive me my impetuosity, but shouldn't it be fixed?

wysota
4th January 2013, 23:07
Well, forgive me my impetuosity, but shouldn't it be fixed?

Be my guest, fix it :)