[Slim-Checkins] r12325 - in /trunk/server/Slim/Player: Player.pm Source.pm
andy at svn.slimdevices.com
andy at svn.slimdevices.com
Mon Jul 2 10:47:30 PDT 2007
Author: andy
Date: Mon Jul 2 10:47:29 2007
New Revision: 12325
URL: http://svn.slimdevices.com?rev=12325&view=rev
Log:
Possible fix for bugs 4817 and 5137: stop fading after powering off, don't advance to the next track if sleeping soon
Modified:
trunk/server/Slim/Player/Player.pm
trunk/server/Slim/Player/Source.pm
Modified: trunk/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Player.pm?rev=12325&r1=12324&r2=12325&view=diff
==============================================================================
--- trunk/server/Slim/Player/Player.pm (original)
+++ trunk/server/Slim/Player/Player.pm Mon Jul 2 10:47:29 2007
@@ -313,7 +313,12 @@
my $rate = $f->{'rate'};
- if (!$rate || $rate < 0 && $f->{'vol'} < $f->{'endVol'} || $rate > 0 && $f->{'vol'} > $f->{'endVol'}) {
+ if (
+ !$rate
+ || ( $rate < 0 && $f->{'vol'} < $f->{'endVol'} )
+ || ( $rate > 0 && $f->{'vol'} > $f->{'endVol'} )
+ || !$client->power
+ ) {
# reached end of fade
$client->volume($f->{'endVol'}, 1);
Modified: trunk/server/Slim/Player/Source.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Source.pm?rev=12325&r1=12324&r2=12325&view=diff
==============================================================================
--- trunk/server/Slim/Player/Source.pm (original)
+++ trunk/server/Slim/Player/Source.pm Mon Jul 2 10:47:29 2007
@@ -629,6 +629,12 @@
return;
}
+ # Don't advance if we are sleeping within the next 10 seconds
+ if ( $client->currentSleepTime() && $client->currentSleepTime() < 10 ) {
+ $log->info( $client->id . ": Ignoring decoder underrun, playing is sleeping" );
+ return;
+ }
+
streamNextTrack($client);
}
@@ -674,6 +680,13 @@
$client->readytosync(-1);
$log->info($client->id, ": Underrun while this mode: ", $client->playmode);
+
+ # Don't advance if we are sleeping within the next 10 seconds
+ if ( $client->currentSleepTime() && $client->currentSleepTime() < 10 ) {
+ $log->info( $client->id . ": Ignoring underrun, playing is sleeping" );
+ $client->stop();
+ return;
+ }
# if we're synced, then we tell the player to stop and then let resync restart us.
More information about the checkins
mailing list