Results 1 to 5 of 5

Thread: Phonon skipping two tracks

  1. #1
    Join Date
    Nov 2009
    Posts
    2
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default Phonon skipping two tracks

    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:
    Qt Code:
    1. void MainWindow::nextFile()
    2. {
    3.  
    4. int index = sources.indexOf(mediaObject->currentSource()) + 1;
    5.  
    6. if (sources.size() > index) {
    7. mediaObject->stop();
    8. mediaObject->clearQueue();
    9. mediaObject->blockSignals(true);
    10. index = sources.indexOf(mediaObject->currentSource()) + 1;
    11. mediaObject->setCurrentSource(sources.at(index));
    12. mediaObject->blockSignals(false);
    13. mediaObject->play();
    14. setLabelNowPlaying();
    15. }
    16. }
    To copy to clipboard, switch view to plain text mode 
    ?
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon skipping two tracks

    Your app doesn't work for me at all. I can add files by pressing the eject button, but nothing else works.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Oct 2008
    Posts
    306
    Thanks
    6
    Thanked 9 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Phonon skipping two tracks

    I get :
    Qt Code:
    1. F:/Documents/QT Projects/Phonon app/mainwindow.cpp:112: warning: enumeration value `BufferingState' not handled in switch
    2. F:/Documents/QT Projects/Phonon app/mainwindow.cpp:112: warning: enumeration value `ErrorState' not handled in switch
    3. :-1: error: collect2: ld returned 1 exit status
    To copy to clipboard, switch view to plain text mode 

    Compile output:
    Qt Code:
    1. C:\Qt\2009.03\mingw\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lphonond
    2. collect2: ld returned 1 exit status
    3. mingw32-make[1]: *** [debug\MPED.exe] Error 1
    4. mingw32-make: *** [debug] Error 2
    5. Exited with code 2.
    6. Error while building project MPED
    7. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 
    But maybe something I dont have configured?

  4. #4
    Join Date
    Nov 2009
    Posts
    2
    Qt products
    Qt3 Qt4 PyQt3 PyQt4
    Platforms
    Unix/X11

    Default Re: Phonon skipping two tracks

    I think it's because I couldn't upload all the files, I have created a git repo at http://github.com/pymatio/MPED

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Phonon skipping two tracks

    I suggest you prepare a minimal compilable example reproducing the problem.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. I cannot run the phonon demos in the PXA270!Can someone help me?
    By Justin_W in forum Qt for Embedded and Mobile
    Replies: 8
    Last Post: 19th February 2010, 11:14
  2. Replies: 2
    Last Post: 24th April 2009, 13:13
  3. Problem with compiling qt on windows xp with phonon
    By junky in forum Installation and Deployment
    Replies: 3
    Last Post: 13th April 2009, 09:13
  4. Phonon in standalone app via py2app - backend plugin error
    By tory108 in forum Installation and Deployment
    Replies: 6
    Last Post: 20th February 2009, 19:36
  5. Phonon issues with DirectSound9
    By Zoltán in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2009, 03:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.