--- ../../../slimserver-20041216nightly/Slim/Player/Squeezebox.pm 2004-12-16 22:14:49.000000000 +0000 +++ Squeezebox.pm 2005-01-08 13:12:21.334415101 +0000 @@ -612,18 +612,24 @@ my $pitch = shift; my $pause = shift; - my $freq = int(18432 / ($pitch / 100)); - my $freqHex = sprintf('%05X', $freq); - $::d_control && msg("Pitch frequency set to $freq ($freqHex), pause: $pause\n"); - if ($client->streamformat()) { if ($client->streamformat() eq 'mp3') { + my $freq = int(18432 / ($pitch / 100)); + #my $freq = 18432 + ($pitch - 100); # alternative for small variation to synch with dac + my $freqHex = sprintf('%05X', $freq); + $::d_control && msg("Pitch frequency set to $freq ($freqHex), pause: $pause\n"); + $client->i2c( Slim::Hardware::mas35x9::masWrite('OfreqControl', $freqHex). Slim::Hardware::mas35x9::masWrite('OutClkConfig', '00001'). Slim::Hardware::mas35x9::masWrite('IOControlMain', '00015') # MP3 ); } else { + my $freq = int(20062 / ($pitch / 100)); + #my $freq = 20062 + ($pitch - 100); # alternative for small variation to synch with dac + my $freqHex = sprintf('%05X', $freq); + $::d_control && msg("Pitch frequency set to $freq ($freqHex), pause: $pause\n"); + if ($pause && ($client->playmode() =~ /^play/)) { if (Slim::Utils::Timers::killTimers($client, \&resume) == 0) { $client->pause();