mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-14 15:37:10 +03:00
more resampling options
This commit is contained in:
@@ -112,8 +112,8 @@ static void usage(const char *argv0) {
|
||||
" \t\t\t phase_response = 0-100 (0 = minimum / 50 = linear / 100 = maximum)\n"
|
||||
#endif
|
||||
#if RESAMPLE16
|
||||
" -R -u [params]\tResample, params = (i|m)[:i],\n"
|
||||
" \t\t\t i = linear interpolation, m = 13 taps filter, i = interpolate filter coefficients\n"
|
||||
" -R -u [params]\tResample, params = (b|l|m)[:i],\n"
|
||||
" \t\t\t b = basic linear interpolation, l = 13 taps, m = 21 taps, i = interpolate filter coefficients\n"
|
||||
#endif
|
||||
#if DSD
|
||||
#if ALSA
|
||||
|
||||
@@ -116,7 +116,7 @@ bool resample_newstream(struct processstate *process, unsigned raw_sample_rate,
|
||||
if (raw_sample_rate != outrate) {
|
||||
|
||||
LOG_INFO("resampling from %u -> %u", raw_sample_rate, outrate);
|
||||
r.resampler = resample16_create((float) outrate / raw_sample_rate, RESAMPLE16_SMALL, false);
|
||||
r.resampler = resample16_create((float) outrate / raw_sample_rate, r.filter, NULL, false);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -147,8 +147,9 @@ bool resample_init(char *opt) {
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
if (*filter == 'm') r.filter = RESAMPLE16_SMALL;
|
||||
else r.filter = RESAMPLE16_FAST;
|
||||
if (*filter == 'm') r.filter = RESAMPLE16_MED;
|
||||
else if (*filter == 'l') r.filter = RESAMPLE16_LOW;
|
||||
else r.filter = RESAMPLE16_BASIC;
|
||||
}
|
||||
|
||||
if (interp && *interp == 'i') {
|
||||
|
||||
Reference in New Issue
Block a user