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:
David Sansome 2010-12-07 20:29:13 +00:00
parent bbf0cd48c2
commit 44dc05a87a
2 changed files with 8 additions and 0 deletions

View File

@ -423,6 +423,13 @@ void Player::TrackAboutToEnd() {
if (engine_->is_autocrossfade_enabled()) {
// Crossfade is on, so just start playing the next track. The current one
// 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);
} else {
// Crossfade is off, so start preloading the next track so we don't get a

View File

@ -69,6 +69,7 @@ class Base : public QObject, boost::noncopyable {
// Simple accessors
inline uint volume() const { return volume_; }
virtual const Scope &scope() { return scope_; }
bool is_fadeout_enabled() const { return fadeout_enabled_; }
bool is_crossfade_enabled() const { return crossfade_enabled_; }
bool is_autocrossfade_enabled() const { return autocrossfade_enabled_; }