Author: ayoung
Date: Wed Nov 9 02:51:09 2011
New Revision: 33672
URL: http://svn.slimdevices.com/slim?rev=33672&view=rev
Log:
Fixed bug 17742: Buffering status wrong for players that decode while buffering
Pass outputBufferThreshold parameter to Player::Buffering().
Modified:
7.7/trunk/server/Slim/Player/Player.pm
7.7/trunk/server/Slim/Player/Squeezebox.pm
Modified: 7.7/trunk/server/Slim/Player/Player.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Player/Player.pm?rev=33672&r1=33671&r2=33672&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Player/Player.pm (original)
+++ 7.7/trunk/server/Slim/Player/Player.pm Wed Nov 9 02:51:09 2011
@@ -1086,7 +1086,7 @@
}
sub buffering {
- my ($client, $bufferThreshold) = @_;
+ my ($client, $bufferThreshold, $outputThreshold) = @_;
my $song = $client->streamingSong();
my $url = $song->currentTrack()->url;
@@ -1103,7 +1103,7 @@
$client,
Time::HiRes::time() + 0.125,
\&_buffering,
- {song => $song, threshold => $bufferThreshold, title => $title, cover => $cover}
+ {song => $song, threshold => $bufferThreshold, outputThreshold => $outputThreshold, title => $title, cover => $cover}
);
}
Modified: 7.7/trunk/server/Slim/Player/Squeezebox.pm
URL: http://svn.slimdevices.com/slim/7.7/trunk/server/Slim/Player/Squeezebox.pm?rev=33672&r1=33671&r2=33672&view=diff
==============================================================================
--- 7.7/trunk/server/Slim/Player/Squeezebox.pm (original)
+++ 7.7/trunk/server/Slim/Player/Squeezebox.pm Wed Nov 9 02:51:09 2011
@@ -179,6 +179,12 @@
# Calculate the correct buffer threshold for remote URLs
if ( $handler->isRemote() ) {
+ my $bufferSecs = $prefs->get('bufferSecs') || 3;
+ if ( main::SLIM_SERVICE ) {
+ # Per-client buffer secs pref on SN
+ $bufferSecs = $prefs->client($client)->get('bufferSecs') || 3;
+ }
+
# begin playback once we have this much data in the decode buffer (in KB)
$params->{bufferThreshold} = 20;
@@ -189,12 +195,6 @@
# If we know the bitrate of the stream, we instead buffer a certain number of seconds of audio
elsif ( my $bitrate = $controller->song()->streambitrate() ) {
- my $bufferSecs = $prefs->get('bufferSecs') || 3;
-
- if ( main::SLIM_SERVICE ) {
- # Per-client buffer secs pref on SN
- $bufferSecs = $prefs->client($client)->get('bufferSecs') || 3;
- }
$params->{bufferThreshold} = ( int($bitrate / 8) * $bufferSecs ) / 1000;
@@ -202,7 +202,7 @@
$params->{bufferThreshold} = 255 if $params->{bufferThreshold} > 255;
}
- $client->buffering($params->{bufferThreshold} * 1024);
+ $client->buffering($params->{bufferThreshold} * 1024, $bufferSecs * 44100 * 2 * 4);
}
$client->bufferReady(0);
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.