Results 1 to 2 of 2

Thread: QSound in embedded ubuntu: using null output device none available

  1. #1
    Join Date
    Apr 2014
    Location
    CA
    Posts
    1
    Qt products
    Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Question QSound in embedded ubuntu: using null output device none available

    Hi all:
    I'm a beginner of Qt, now I'm working on a small program which can play wav files with QSound.
    I tried to run the program on my PC which runs ubuntu 12.04, it worked.
    But when I tried to run it on the ARM system, there's a error notice read that:

    using null output device none available.

    So could anyone help me with that error?
    Is it because I missed some libs or other resources?

    Thanks a lot.

    The codes are here:
    (It's a Qt console program)
    audio.pro:
    Qt Code:
    1. QT += core
    2.  
    3. CONFIG +=qt thread
    4. greaterThan(QT_MAJOR_VERSION, 4): QT += widgets multimedia
    5.  
    6. QT -= gui
    7.  
    8. TARGET = audioconsole
    9. # target.files=audioconsole
    10. # target.path=/home/ubuntu/audioconsole
    11.  
    12. #INSTALLS == target
    13.  
    14.  
    15. CONFIG += console
    16. CONFIG -= app_bundle
    17.  
    18. TEMPLATE = app
    19.  
    20.  
    21. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    And the main.cpp file

    Qt Code:
    1. #include <QCoreApplication>
    2. #include <QSound>
    3. #include <stdio.h>
    4.  
    5. QSound player("/home/ubuntu/audioconsole/affirmative.wav");
    6.  
    7. int main(int argc, char *argv[])
    8. {
    9. QCoreApplication a(argc, argv);
    10.  
    11. printf("audio test\n");
    12.  
    13. player.play();
    14.  
    15. printf("succeed\n");
    16.  
    17. return a.exec();
    18.  
    19. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QSound in embedded ubuntu: using null output device none available

    Use method QSound::isAvailable() to test if sound system is available.

Similar Threads

  1. QSound and embedded resources
    By baray98 in forum Qt Programming
    Replies: 4
    Last Post: 19th May 2017, 13:38
  2. QSound isn't available under ubuntu desktop.
    By josentop in forum Qt Programming
    Replies: 3
    Last Post: 11th January 2012, 08:45
  3. Replies: 0
    Last Post: 1st December 2011, 05:07
  4. Playing sound as by QSound on Maemo on N900 device using Qt
    By freely in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 4th April 2011, 08:12
  5. NUll character output for combobox index
    By mdskpr778 in forum Qt Programming
    Replies: 2
    Last Post: 8th October 2008, 18:22

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.