PDA

View Full Version : A Question about Use QSound to Play Wav Files??



wquanw
7th July 2006, 09:05
Referce to the doc of QSound class , I place the follow code into the example.

I used relative and absolute path to load the wav file respective
QSound::play("./sound.wav");
or
QSound belles("./sound.wav");
belles.play();

and

QSound::play("/usr/qt4/sound.wav");
or
QSound belles("/usr/qt4/sound.wav");
belles.play();

but they meet error:QWSSocket::connectToLocalFile could not connect::No such file of directory .

then , I remove all the macros QT_NO_SOUND and QT_NO_QWS_SOUNDSERVER in the qt src and recompile it ,but I fail again to use the QSound class.
what 's wrong ?

My os is linux -- Fedora --FC4 and qt ver is qtopia4.1.2. I implement the qt program under the linux text mode. and my login user is root.

jacek
7th July 2006, 10:14
Did you pass -system-nas-sound switch to the configure utility when you were building Qt?