Hi Friends,
I am using QML Audio element.
I am using two .wav files and toggling from one to second wav file and vice versa shown below.Code:Audio { id: playMusic onStopped: { playMusic.play() } }
when this code is executed first file is played very well but when pressing "Next", the second file unable to play...i have check in console the second file is loaded but unable to play.Code:Button { id: stopButton x: 424 y: 2 width: 67 height: 36 anchors { right: parent.right; verticalCenter: parent.verticalCenter } text: "Next" onClicked: { Logic.a+=1 if(Logic.a==Logic.hex1.length) Logic.a=0 playMusic.source = Logic.pic()+".wav" console.log(playMusic.source) playMusic.play() }
When i remove onStopped method from the Audio element it works as expected,but i want to repeat the playing so when a music file plays fully and get stopped the onStopped method is called and it start playing again...
Any other alternate way to play repeatedly audio file...?????![]()




