I have a single filter with a sample rate of 48000, so I want to downsample everything to 48000 samples/sec before passing it on to brutefir. I created a template-flac-48000.conf in /etc/squeezebox/BrutefirDRC with the entry
flc flc * b8:27:eb:33:ef:c4
# IFT:{START=trim %t}D:{RESAMPLE=rate -v -L -s}
[sox] -q -D -t flac $FILE$ -t wavpcm -c 2 -3 -e signed-integer - $START$ $LOUDNESS$ rate -v -L -s 48000 | [brutefirwrapper] b8:27:eb:33:ef:c4 /etc/squeezeboxserver/BrutefirDrc/settings/filter-b8_27_eb_33_ef_c4 | [sox] -q -D -t wavpcm - -t flac -C 0 -
Is this the right way to do this? I'm guessing here.
This seems to work except that I get dropouts with 192k files. I assume that the resampling can't keep up. I do get an underflow message in the brutefir.log:
Output follows (2.071s)
Internal resolution is 64 bit floating point.
SSE2 capability detected -- optimisation enabled.
Creating 4 FFTW plans of size 16384...finished.
Loading 2 coefficient sets...finished.
Estimated CPU clock rate is 3311.971 MHz. CPU count is 4.
Filters in process 0: 0
Filters in process 1: 1
Audio processing starts now
Readahead complete (2.221s)
File I/O: Write failed: Broken pipe.
I/O module failed to write due to buffer underflow, aborting.
I tried added "--multi-threaded --buffer 131072" as suggested in the template file, but no luck. This is a quad core Xeon, so I think it should be able to handle this.
Thanks for any hints,
Dave Cook