Results 1 to 4 of 4

Thread: QSound isn't available under ubuntu desktop.

  1. #1
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default QSound isn't available under ubuntu desktop.

    I'm trying to use QSound in my program under ubuntu desktop as below,
    if (QSound::isAvailable())
    {
    qDebug() << "Sound is playing!";
    QSound bell(QString("warnhighsound.wav");
    bell.play();
    }
    else
    {
    qDebug() << "Sound isn't available!");
    }
    it always show 'Sound isn't available!' message to me. does't it mean QSound not work on ubuntu desktop? My Qt is nearly version (4.8)
    Can anyone give some suggestion? thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSound isn't available under ubuntu desktop.

    QSound is usually disabled on Linux because it requires presence of NAS server which is rarely deployed nowadays. Use Phonon or QtMultimedia instead.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2011
    Posts
    30
    Thanks
    6
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: QSound isn't available under ubuntu desktop.

    PHONON or QtMultimedia must install the multimedia backend system, it will cause the system to be very complex. I only want to play '.wav' file simply.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QSound isn't available under ubuntu desktop.

    Then install Network Audio System (http://radscan.com/nas.html) or just use an external commandline player such as aplay.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 0
    Last Post: 26th April 2011, 12:32
  2. QSound on Mac
    By loveablepocky in forum Newbie
    Replies: 0
    Last Post: 16th February 2011, 01:29
  3. Replies: 2
    Last Post: 11th June 2010, 07:23
  4. Replies: 5
    Last Post: 31st January 2009, 07:36
  5. QSound.
    By csvivek in forum Qt Programming
    Replies: 2
    Last Post: 23rd June 2008, 22:02

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.