[Slim-Checkins] r10287 - /branches/6.5/server/Slim/Player/Source.pm

andy at svn.slimdevices.com andy at svn.slimdevices.com
Wed Oct 11 07:51:20 PDT 2006


Author: andy
Date: Wed Oct 11 07:51:19 2006
New Revision: 10287

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

Modified:
    branches/6.5/server/Slim/Player/Source.pm

Modified: branches/6.5/server/Slim/Player/Source.pm
URL: http://svn.slimdevices.com/branches/6.5/server/Slim/Player/Source.pm?rev=10287&r1=10286&r2=10287&view=diff
==============================================================================
--- branches/6.5/server/Slim/Player/Source.pm (original)
+++ branches/6.5/server/Slim/Player/Source.pm Wed Oct 11 07:51:19 2006
@@ -644,16 +644,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