Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Alternative for QMediaPlayer on embedded system.
Qt 6.11 is out! See what's new in the release blog

Alternative for QMediaPlayer on embedded system.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 555 Views 2 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.
  • SebastianMS Offline
    SebastianMS Offline
    SebastianM
    wrote on last edited by
    #1

    Hi,
    I'm using QMediaPlayer to play short notifications. As I have 4 different wav files - I created 4 QMediaPlayer with those files loaded/buffered on startup.
    Problem is that sometimes when one notification already plays and second starts - I have 2-3 delay. As I understand QMediaPlayer executed internally gstreamer pipeline and plays it. Which maybe heavy and triggers this delays.
    Moving playing this second wav file to QProcess and aplay resolved this problem. But it's ugly solution.
    I tried QSound, QSoundEffect and QAudioOutput - but all of them rely on PulseAudio which isn't on my system (I've got only ALSA).
    What other ways can I use to play those notifications reliable and fast?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Are you using Qt 5 ? If so, I remember there's an ALSA backend, you should check for it.

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

      SebastianMS 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Are you using Qt 5 ? If so, I remember there's an ALSA backend, you should check for it.

        SebastianMS Offline
        SebastianMS Offline
        SebastianM
        wrote on last edited by SebastianM
        #3

        @SGaist Yes, 5.14
        How to activate this ALSA backend WITHOUT Qt recompilation?
        I found qtmultimedia/src/plugins/alsa/qalsaaudiooutput.cpp, but when I use ALSA keyword in index search - it returns nothing.

        PS: I found that QT_QPA_EGLFS_KMS_CONFIG pointing to file with

        [Device0]
        output_name=ALSA
        

        set as enviromental variable of my application should be enough to change default device from PulseAudio to Alsa. But ... no success.
        Veryfing if -lasound added to LIBS will help.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          One thing you can do is move all other plugins in a different folder.

          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

          • Login

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