mirror of
https://github.com/clementine-player/Clementine
synced 2025-02-01 11:56:45 +01:00
Don't stop the track when it's about to end if crossfading is enabled but fadeout is disabled. Fixes issue #1040
This commit is contained in:
parent
bbf0cd48c2
commit
44dc05a87a
@ -423,6 +423,13 @@ void Player::TrackAboutToEnd() {
|
|||||||
if (engine_->is_autocrossfade_enabled()) {
|
if (engine_->is_autocrossfade_enabled()) {
|
||||||
// Crossfade is on, so just start playing the next track. The current one
|
// Crossfade is on, so just start playing the next track. The current one
|
||||||
// will fade out, and the new one will fade in
|
// will fade out, and the new one will fade in
|
||||||
|
|
||||||
|
// But, if there's no next track and we don't want to fade out, then do
|
||||||
|
// nothing and just let the track finish to completion.
|
||||||
|
if (!engine_->is_fadeout_enabled() &&
|
||||||
|
playlists_->active()->next_index() == -1)
|
||||||
|
return;
|
||||||
|
|
||||||
NextInternal(Engine::Auto);
|
NextInternal(Engine::Auto);
|
||||||
} else {
|
} else {
|
||||||
// Crossfade is off, so start preloading the next track so we don't get a
|
// Crossfade is off, so start preloading the next track so we don't get a
|
||||||
|
@ -69,6 +69,7 @@ class Base : public QObject, boost::noncopyable {
|
|||||||
// Simple accessors
|
// Simple accessors
|
||||||
inline uint volume() const { return volume_; }
|
inline uint volume() const { return volume_; }
|
||||||
virtual const Scope &scope() { return scope_; }
|
virtual const Scope &scope() { return scope_; }
|
||||||
|
bool is_fadeout_enabled() const { return fadeout_enabled_; }
|
||||||
bool is_crossfade_enabled() const { return crossfade_enabled_; }
|
bool is_crossfade_enabled() const { return crossfade_enabled_; }
|
||||||
bool is_autocrossfade_enabled() const { return autocrossfade_enabled_; }
|
bool is_autocrossfade_enabled() const { return autocrossfade_enabled_; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user