Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7599

QWSSocket not able to connect to /tmp/.qt_soundserver-0

    XMLWordPrintable

Details

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes