Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Chinese
  4. QSound在imx6嵌入式ubuntu中运行出错: using null output device none available
Forum Updated to NodeBB v4.3 + New Features

QSound在imx6嵌入式ubuntu中运行出错: using null output device none available

Scheduled Pinned Locked Moved Chinese
2 Posts 2 Posters 5.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    maatong
    wrote on last edited by
    #1

    大家好:
    我有一个问题想请教一下。
    现在我编了一个小程序,就是用QSound播放local的wav音乐。
    我在电脑上试了这个程序,播放没有问题。但是在移入ARM(imx6)之后,运行出现这个提示错误:
    using null output device none available.
    电脑上和arm板上运行的都是ubuntu12.04系统。
    请问这是什么类型的问题呢?
    是我的arm系统里缺少运行使用的库造成的么?
    谢谢大家!

    源码在这里:
    pro文件:
    @QT += core

    CONFIG +=qt thread
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets multimedia

    QT -= gui

    TARGET = audioconsole

    target.files=audioconsole

    target.path=/home/ubuntu/audioconsole

    #INSTALLS == target

    CONFIG += console
    CONFIG -= app_bundle

    TEMPLATE = app

    @

    main.cpp文件
    @#include <QCoreApplication>
    #include <QSound>
    #include <stdio.h>

    QSound player("/home/ubuntu/audioconsole/affirmative.wav");

    int main(int argc, char *argv[])
    {
    QCoreApplication a(argc, argv);

    printf("audio test\n");
    
    player.play();
    
    printf("succeed\n");
    
    return a.exec&#40;&#41;;
    

    }@

    https://www.linkedin.com/pub/yini-guo/71/4b3/4a0

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yeqingbo
      wrote on last edited by
      #2

      需要把Qt开发环境中的Audio 目录拷贝到你程序的运行路径,就可以解决此问题。

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved