Nominate our 2022 Qt Champions!

Playing songs with Phonon

  • I'm trying to learn how to use Phonon to play music. I have this code:
    sources.append(MediaSource("D:/Music/Lindsey Stirling/16. Lindsey Stirling - Crystallize.mp3"));
    sources.append(MediaSource("D:/Music/Lindsey Stirling/11. Lindsey Stirling - Song of the Caged Bird.mp3"));

    createPath(mediaObject, audioOutput);
    currentSource = 0;


    Then I have a next button which increments currentSource and calls; For some reason though, only one of the songs plays. Both files exists for sure but one just won't play. Any ideas on whats wrong or how to track it down? Thanks a lot.

Log in to reply