Hey there, I'm making a music player so have to use a QTimer and set its interval to the length of the current song in order to know when to automatically play the next song in the playlist when the current one ends. This part works perfectly. But I have a problem if I pause the audio:
When I press the pause button and the audio file pauses, the timer does not! So this means that when I resume the song, the app will switch to the next one before the current one has ended as the QTimer has not been paused when I paused the song itself via the button. I found this code but am getting an OverflowError at the very last line where self.start is called in the resume function. Can anybody tell if it's even possible to pause/resume a QTimer (not natively I guess, but with some 3rd party script/override). Or if you have another idea about how to automatically know when the current song has ended - I'm open to that as well.
When I press the pause button and the audio file pauses, the timer does not! So this means that when I resume the song, the app will switch to the next one before the current one has ended as the QTimer has not been paused when I paused the song itself via the button. I found this code but am getting an OverflowError at the very last line where self.start is called in the resume function. Can anybody tell if it's even possible to pause/resume a QTimer (not natively I guess, but with some 3rd party script/override). Or if you have another idea about how to automatically know when the current song has ended - I'm open to that as well.