Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Playing songs with Phonon
Forum Updated to NodeBB v4.3 + New Features

Playing songs with Phonon

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 819 Views 1 Watching
  • 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.
  • J Offline
    J Offline
    jeffsg605
    wrote on last edited by
    #1

    I'm trying to learn how to use Phonon to play music. I have this code:
    [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;
    mo->setCurrentSource(sources.at(currentSource));
    

    [/CODE]

    Then I have a next button which increments currentSource and calls mediaObject.play(); 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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved