PDA

View Full Version : Phonon skipping two tracks



matio
22nd November 2009, 14:24
I'm trying to make a media player, the main problem at the moment is that when the user presses the next button it skipps two tracks instead of one. I think this is to do with the signals so I added blockSignals(true), but it still doesn't work:


void MainWindow::nextFile()
{

int index = sources.indexOf(mediaObject->currentSource()) + 1;

if (sources.size() > index) {
mediaObject->stop();
mediaObject->clearQueue();
mediaObject->blockSignals(true);
index = sources.indexOf(mediaObject->currentSource()) + 1;
mediaObject->setCurrentSource(sources.at(index));
mediaObject->blockSignals(false);
mediaObject->play();
setLabelNowPlaying();
}
}

?

wysota
22nd November 2009, 20:03
Your app doesn't work for me at all. I can add files by pressing the eject button, but nothing else works.

been_1990
22nd November 2009, 23:37
I get :

F:/Documents/QT Projects/Phonon app/mainwindow.cpp:112: warning: enumeration value `BufferingState' not handled in switch
F:/Documents/QT Projects/Phonon app/mainwindow.cpp:112: warning: enumeration value `ErrorState' not handled in switch
:-1: error: collect2: ld returned 1 exit status

Compile output:

C:\Qt\2009.03\mingw\bin\..\lib\gcc\mingw32\3.4.5\. .\..\..\..\mingw32\bin\ld.exe: cannot find -lphonond
collect2: ld returned 1 exit status
mingw32-make[1]: *** [debug\MPED.exe] Error 1
mingw32-make: *** [debug] Error 2
Exited with code 2.
Error while building project MPED
When executing build step 'Make'
But maybe something I dont have configured?

matio
24th November 2009, 15:39
I think it's because I couldn't upload all the files, I have created a git repo at http://github.com/pymatio/MPED

wysota
24th November 2009, 17:03
I suggest you prepare a minimal compilable example reproducing the problem.