PDA

View Full Version : qsound on fedora 8



phanlam
24th October 2011, 09:29
i use fedora 8, qt-x11-4.4.2 and this i my code

#include <QApplication>
#include <QSound>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QSound:: play("/home/wavefile/laugh.wav");

return a.exec();
}


but i cannot hear any sound.
Qsound::isAvailabel always returns true
and i think nas has already installed but when i run nasd command , it returns error.

anybody help me? thanks

sorry for my english

phanlam
25th October 2011, 09:08
Now, when i use qt-ebedded-4.4.2 to compile the qsound application and run it with command ./qsound -qws .It worked ok.
But when i setloop (100) it just played 32 times , then i can not play any thing
Code like that:


#include <QApplication>
#include <QSound>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QSound *sound =new QSound("/home/wavefile/laugh.wav");
sound->setloop(100);
sound->play();

return a.exec();
}

Then when i play sound with aplay, i cannot hear anything.
can anybody help me?