c++ - Qt: How to repeat sound x times with QtSound -
i'm not sure understand correctly how qsound.setloop function should work.
i want play wave file 3 times. tried following code plays once.
qsound soundobj(filepath); soundobj.setloops(3); soundobj.play(); help :-)
edit: full version of code looks this
void alarms::playsound(qstring filepath) { qsound soundobj(filepath); soundobj.setloops(3); soundobj.play(); }
soundobj object destroyed quickly.
has allocated dynamically.
Comments
Post a Comment