Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
4.5.0
-
None
Description
I am able to cat wavfile.wav > /dev/dsp and the sound in wavfile.wav gets played after adding kernel options for OSS /dev/dsp device. This is my code:-
if(QSound::isAvailable()) { qDebug("SoundInterface-QSound is available !!"); QSound linuxsound("/usr/bin/wavs/Height-Alarm.wav"); linuxsound.play(); qDebug("SoundInterface-End play"); }
According to the documentation we should be able to play sound through /dev/dsp using QSound. I am finding that the isAvailable() test succeeds and the sound is attempted to be played. I get the following output:-
connectToLocalFile /tmp/.qt_soundserver-0 (my debug code in qwssocket_qws.cpp) QWSSocket::connectToLocalFile could not connect:: Connection refused
QObject::startTimer: QTimer can only be used with threads started with QThread SoundInterface-QSound is available !!
SoundInterface-End play
Have checked the permission on .qt_soundserver-0 and everything should be ok. The bit about QTimer seems to be irrelevant from where QSound gets played in the user application. Seems like it is creating a QWSSocket (derived from QTCPSocket) to stream audio to QWSSocketServer which creates a QWSSocketServer::newConnection to handle the stream. Only trouble is the connection is not happening (connectToLocalFile problem) and I don't know why.