Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

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

    General and Desktop
    3
    4
    1784
    Loading More Posts
    • 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
      KushalAusula last edited by

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

      1 Reply Last reply Reply Quote 0
      • Jeroentjehome
        Jeroentjehome last edited by

        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 Reply Quote 0
        • IamSumit
          IamSumit last edited by

          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 Reply Quote 0
          • K
            KushalAusula last edited by

            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 Reply Quote 0
            • First post
              Last post