[Slim-Checkins] r10288 - /trunk/server/Slim/Player/Source.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Wed Oct 11 07:53:43 PDT 2006


Author: andy
Date: Wed Oct 11 07:53:42 2006
New Revision: 10288

URL: http://svn.slimdevices.com?rev=10288&view=rev
Log:
Only rebuffer if the buffer is completely empty, low bitrate stations don't work real well with the previous method

Modified:
    trunk/server/Slim/Player/Source.pm

Modified: trunk/server/Slim/Player/Source.pm
URL: http://svn.slimdevices.com/trunk/server/Slim/Player/Source.pm?rev=10288&r1=10287&r2=10288&view=diff
==============================================================================
--- trunk/server/Slim/Player/Source.pm (original)
+++ trunk/server/Slim/Player/Source.pm Wed Oct 11 07:53:42 2006
@@ -630,16 +630,8 @@
 	my $fullness = $client->bufferFullness();
 	my $songTime = songTime($client);
 	
-	# We want the buffer to contain the same amount of data required by quickstart
-	my $threshold = 20 * 1024;
-	
-	# If we know the bitrate of the stream, we instead buffer a certain number of seconds of audio
-	if ( my $bitrate = Slim::Music::Info::getBitrate($url) ) {
-		my $bufferSecs = Slim::Utils::Prefs::get('bufferSecs') || 3;
-		$threshold     = int($bitrate / 8) * $bufferSecs;
-	}
-	
-	if ( $fullness < $threshold && $songTime > 10 ) {
+	# If the buffer is empty, rebuffer	
+	if ( !$fullness && $songTime > 30 ) {
 		$::d_source && msg("Buffered audio dropped to $fullness bytes, pausing to rebuffer\n");
 		
 		$client->pause();



More information about the checkins mailing list