Hello, this is my first post, so please be kind.
In order to upsample Wav files to 48000 Hz PCM, the following file was
patched:
/Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Slim/Player/Squeezebox.pm
This is on a Mac, but I assume finding this file on Windows should not
be too difficult.
The patch consists of adding two lines of code:
- one line to increase the bit depth from 16 to 24 bit
- the second to change/force the output rate to 48000 Hz
Here is the changed code:
sub stream_s {
# snip
if ($format eq 'pcm') { # unfortunately required for .wav files
# snip
if ( $track ) {
$pcmsamplesize = $client-pcm_sample_sizes($track);
$pcmsamplerate = $client-pcm_sample_rates($track);
$pcmchannels = $track-channels() || '2';
}
# Add two lines of code
$pcmsamplesize = 2; # 1;1-16 bits, 2-24 bits, patch
$pcmsamplerate = 4; # 3;3-44100, 4-48000 10-88200,
9-96000,
patch
# Upsample patch completed
The entry in the convert.conf file is:
wav pcm * *
# F
[sox_14_2] -q --buffer 32768 -t wav -r44100 -2 -c2 $FILE$ -t raw -C0
-3 -c2 -r48000 - polyphase -cutoff 1.0
Do add the line # F, for else no filename is passed to Sox, so nothing
can be upsampled.
Note:
Sox Version 14.2 is used to upsample, as this has the polyphase
option.
To use this, copy the version 14.2 Sox.exe file to:
/Library/PreferencePanes/Squeezebox.prefPane/Contents/server/Bin/darwin/
To distinguish this file from the distributed Sox.exe, the file is
renamed to sox_14_2.
I hope this does not look too complicated, and that it is of interest
for some people.
--
kef2m
kef2m's Profile: http://forums.slimdevices.com/member.php?userid=48799
View this thread: http://forums.slimdevices.com/showthread.php?t=80903
___
audiophiles mailing list
audiophiles@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/audiophiles