PDA

View Full Version : Synchronization of mp3 tracks on Qt



Uncannytable
26th June 2012, 21:51
I'm developing a simple program with Qt that plays some songs, in each song for each instrument I have a mp3 track and the user has the ability to change the sound volume of each track separably so he can listen to the tracks he wants. The major problem I'm facing is that of synchronization. Especially if I'm running the program off of a CD or Pen-drive, I've had some ideas but they didn't work well.

Right now I'm using phonon but wouldn't mind changing to Mobility if necessary (only if really necessary). What strategy really works in this case? Why is it worst on CD or Pen-drive? Since I'm interested in mostly running from these sources how could I improve synchronization on these devices?

sonulohani
27th June 2012, 10:37
see example qmusicplayer (http://doc.qt.nokia.com/4.7-snapshot/phonon-qmusicplayer-mainwindow-cpp.html)in QtSdk example folder. Or use signal and slots for changing the track. Use---> void MediaObject::finished () signal which will emit when the object has finished playback. It is not emitted if you call stop(), pause() or load(). It is emitted only when the current media source has finished playing and the media queue() is empty, or when a fatal error occurs.