PDA

View Full Version : QSound.



csvivek
23rd June 2008, 13:54
I have an application which requires some .wav files to be played on certain events.
I tried playing it with a member variable of the class and also through the code suggested in the assistant. i m not able to hear any sound.
I checked if QSound::isAvailable() it is returning false always.

but i m able to hear the sound from mplayer.

where is the problem and how do i set QSound Available to True.
i working in linux QT4.3.4

--
Thanks in Advance

jpn
23rd June 2008, 16:36
QSound uses NAS on X11. First you'll need NAS development headers and then you'll need to recompile Qt with NAS support turned on. Take a close look at configure output after qmake has been compiled. You should see something like this:

NAS sound support ... yes

ntp
23rd June 2008, 22:02
When I did this on Linux, I ended up using the linux system calls because it was easier.

4.4 was supposed to have introduced a new sound management tool and a quick search gave me the Phonon Namespace. I see documentation in the qt assistant and I see it at
http://doc.trolltech.com/4.4/phonon-overview.html

I haven't tried it because I wrote that code at another company.

-- ntp