mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Remove complicated QMediaPlayer switching
THe idea behind the switching was to provide gapless playback, but it made the code too complicated and to intertwined with QtMultiMedia. I might attempt to implement it later, but I probably will put the code in a separate class to make it easier to swap the QtMultiMedia implementation with a multimedia implementation for a player with better support for gappless playback.
This commit is contained in:
parent
86672be051
commit
242ccc90c1
2 changed files with 10 additions and 45 deletions
|
@ -226,21 +226,12 @@ private:
|
|||
/// Pointer to the current media player.
|
||||
QMediaPlayer *m_mediaPlayer = nullptr;
|
||||
|
||||
// There are 2 media players over here, so one is able to preload the next song
|
||||
// before the other starts playing
|
||||
|
||||
/// Media player 1
|
||||
QMediaPlayer *m_mediaPlayer1;
|
||||
/// Media player 2
|
||||
QMediaPlayer *m_mediaPlayer2;
|
||||
|
||||
Model::Playlist *m_queue = nullptr;
|
||||
int m_queueIndex = 0;
|
||||
bool m_resumePlayback = true;
|
||||
|
||||
// Helper methods
|
||||
void setItem(QSharedPointer<Model::Item> newItem);
|
||||
void swapMediaPlayer();
|
||||
|
||||
void setStreamUrl(const QUrl &streamUrl);
|
||||
void setPlaybackState(QMediaPlayer::State newState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue