PDA

View Full Version : QSound problem?



anafor2004
18th November 2008, 13:32
Hi all,
I am using Qsound on my embedded Arm device to play some .wav files. My qt version is 4.3.3. It plays wav files very good with
"mySoundplayer->play("mysoundfile.wav");" command. But i couldn't use

QSound::isFinished();
QSound::loop();
QSound::setLoops();

Can you explain me why I couldnt use these functions? Dont they working correctly?

aamer4yu
18th November 2008, 13:39
can we see some code ?? how are u trying to use those functions ?

anafor2004
18th November 2008, 13:49
QSound *myPlayer;

void deneme::soundPlay()
{
if(myPlayer->isAvailable())
{
myPlayer->play("SystemClose.wav");
while(!myPlayer->isFinished())
{
printf("It is still playing \n");
}
}
}

This is in the close event and i want to play a .wav file when my program closes.But it doesnt wait for finishing.
It says segmentation fault on console.

aamer4yu
19th November 2008, 05:09
Where have u initialised mPlayer ?
mPlayer = new QSound(); // missing, isnt it ?