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. [SOLVED]play multiple audio files one after other in qt
Forum Updated to NodeBB v4.3 + New Features

[SOLVED]play multiple audio files one after other in qt

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 2.2k 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.
  • K Offline
    K Offline
    KushalAusula
    wrote on last edited by
    #1

    Hi,
    May I please know the way to play audio files(.wav) continously one after the other.

    1 Reply Last reply
    0
    • JeroentjehomeJ Offline
      JeroentjehomeJ Offline
      Jeroentjehome
      wrote on last edited by
      #2

      Did you check the QSound class and any other multimedia stuff? Simply setup the sound, connect the finished signal and restart?? What did you try already?
      We are not here to code your software.
      REad this:
      "Multimedia":http://qt-project.org/doc/qt-5/qtmultimedia-index.html

      Greetz, Jeroen

      1 Reply Last reply
      0
      • IamSumitI Offline
        IamSumitI Offline
        IamSumit
        wrote on last edited by
        #3

        Hi.
        You can simply make a playlist for that. Using
        @
        QList <QUrl>
        or
        Qlist<QString>
        @

        and
        "QSound":http://qt-project.org/doc/qt-5/qsound.html
        hope it helps.

        Be Cute

        1 Reply Last reply
        0
        • K Offline
          K Offline
          KushalAusula
          wrote on last edited by
          #4

          Hi,
          Thanq for you timely replies.

          Before posting I have went through the possiblilities for playing audio files.

          case 1: when I went through QSound, "isFinished" was returning always true for me. ofcourse mentioned in documentation that this is the behaviour in windows if set loop was not set. But i'm using Ubuntu 14.04 .I tried to set the loop but still i had to face the issue.

          used QStringlist for the paths of my play list and passed it to QSound object and monitored it in a timer...
          Finally this did not work for me

          Case 2: I then used QSoundEffect and used the same QStringList along with the signal playedchanged,sourcechanged,loadedchanged and tried o play the audio one after the other

          Here it worked perfectly fine but the issue was - every succeding audio play sounded along with its previous one.
          for example--- if i had to play file sounding "hello world one" and "hello world two" , when playing hello world two- even a little portion on of hello world one was heard.

          Tried to monitor with timer with some debugging messages but not able to resolve.

          Case 3: Finally i have used Qprocess and triggered audio files with "aplay"(external linux command) and moniterd with "finished" signal of QProcess. This worked for me.

          Please let me know if had have done any mistakes in steps 1 & 2.
          if needed i would paste he code

          Thanq for your time and patience.

          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