--- 5.4.x/server/Slim/Player/Source.pm 2004-12-02 21:21:30.705118074 -0800 +++ Slim/Player/Source.pm 2004-12-01 20:53:29.000000000 -0800 @@ -1,6 +1,6 @@ package Slim::Player::Source; -# $Id: Source.pm,v 1.121.2.1 2004/12/03 02:26:43 vidur Exp $ +# $Id: Source.pm,v 1.124 2004/11/29 19:26:49 dean Exp $ # SlimServer Copyright (C) 2001-2004 Sean Adams, Slim Devices Inc. # This program is free software; you can redistribute it and/or @@ -890,9 +889,11 @@ sub openSong { } else { my $maxRate = Slim::Utils::Prefs::maxRate($client); + my $quality = Slim::Utils::Prefs::clientGet($client,'lameQuality'); + $command = tokenizeConvertCommand($command, $type, '-', $fullpath, 0 , $maxRate, - 1); + 1, $quality); $::d_source && msg("tokenized command $command\n"); my $pipeline = Slim::Player::Pipeline->new($sock, $command); @@ -1058,7 +1059,8 @@ sub openSong { } else { - $command = tokenizeConvertCommand($command, $type, $filepath, $fullpath, $samplerate, $maxRate); + my $quality = Slim::Utils::Prefs::clientGet($client,'lameQuality'); + $command = tokenizeConvertCommand($command, $type, $filepath, $fullpath, $samplerate, $maxRate,undef,$quality); $client->audioFilehandle( FileHandle->new() ); $client->audioFilehandle->open($command); @@ -1293,7 +1295,7 @@ sub getConvertCommand { } sub tokenizeConvertCommand { - my ($command, $type, $filepath, $fullpath, $samplerate, $maxRate, $nopipe) = @_; + my ($command, $type, $filepath, $fullpath, $samplerate, $maxRate, $nopipe,$quality) = @_; # XXX what is this? my $swap = (unpack('n', pack('s', 1)) == 1) ? "" : "-x"; @@ -1326,6 +1328,7 @@ sub tokenizeConvertCommand { $command =~ s/\$FILE\$/"$filepath"/g; $command =~ s/\$URL\$/"$fullpath"/g; $command =~ s/\$RATE\$/$samplerate/g; + $command =~ s/\$QUALITY\$/$quality/g; $command =~ s/\$BITRATE\$/$maxRate/g; $command =~ s/\$-x\$/$swap/g;