[SOLVED]play multiple audio files one after other in qt
May I please know the way to play audio files(.wav) continously one after the other.
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.
IamSumit last edited by
You can simply make a playlist for that. Using
hope it helps.
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.