Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt5.6 Playing .wav file
QtWS25 Last Chance

Qt5.6 Playing .wav file

Scheduled Pinned Locked Moved Solved Mobile and Embedded
qt5audio
3 Posts 2 Posters 1.7k Views
  • 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.
  • Y Offline
    Y Offline
    Yair BA
    wrote on 29 Jun 2017, 08:15 last edited by
    #1

    I'm trying, without success, to use QAudio/QMediaPlayer to play .wav file on a board based on Atmel's SAMA5D2. Running Qt multimedia example 'audiooutput', just opens a GUI and print null device error to the serial console.

    The error messages are:
    If using QAudio - null device found.
    If using QMediaPlayer - no service found for - "org.qt-project.qt.mediaplayer".

    From the command-line there is no problem to play the same .wav file by using 'aplay' or 'tinyplay' command, so it's not an hardware problem.

    Technical details:
    buildroot-2016.05
    Kernel:4.9
    Qt version: 5.6.2
    Driver: wm8523
    Installed packages (among others): qt5multimedia, gstreamer, alsa

    Any suggestions how can I play a .wav file with Qt5? Maybe add phonon package?

    Yair

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 29 Jun 2017, 21:36 last edited by
      #2

      Hi and welcome to devnet,

      You should start your application with the QT_DEBUG_PLUGINS environment variable set to 1. That should show you what happens with the multimedia plugins.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • Y Offline
        Y Offline
        Yair BA
        wrote on 11 Jul 2017, 04:00 last edited by
        #3

        I re-built the file system image, this time with Buildroot-2017.02 and Qt version 5.6.2.

        I ran, on the target board, the audiooutput example that Qt provides and got a lots of pulseaudio warnings.

        Remembering the above QT_DEBUG_PLUGINS hint, I took a look inside the /usr/lib/qt/plugins/audio directory on the target board and found two plugins: libqtmedia_pulse.so and libqtaudio_alsa.so .

        Removing the libqtmedia_pulse.so plugin solved the race condition with libqtaudio_alsa.so and solved the problem.

        In addition, make sure that alsa-lib builds before qt5multimedia (commit 8d7dd837e5e from mainline Buildroot: "qt5multimedia: conditionally add alsa-lib to dependencies").

        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