Hi,

I have trouble to clear the queue of a Phonon::MediaObject definitely. I have a "global":
Qt Code:
  1. Phonon::MediaObject *phononSound;
  2. phononSound = Phonon::createPlayer(Phonon::MusicCategory);
To copy to clipboard, switch view to plain text mode 
and a function which can be triggered by the user.
Qt Code:
  1. phononSound->clearQueue();
  2. QList<Phonon::MediaSource> soundfiles;
  3. // here soundfiles are filed with 0 to 3 wav files.
  4. if (!soundfiles.isEmpty())
  5. {
  6. phononSound->setCurrentSource(soundfiles.takeFirst());
  7. phononSound->enqueue(soundfiles);
  8. phononSound->play();
  9. }
  10. else
  11. phononSound->stop();
To copy to clipboard, switch view to plain text mode 

Now following output occurs:
function called 1st: 2 wav files
-> played 1st wav of 1st call
function called again: 1 wav file
-> played (1st) wav of 2nd call (debug at the end of the 2nd call says that the queue is empty)
-> played 2nd wav of the 1st function call. ???

Why the queue isn't cleared correctly? What's wrong? Various placed phononSound->stop() on different places wont change anything.

Thanks
Lykurg