Custom Resampler Script option

This may be an edge case, as most people just simply allow the software to take control and not worry about it, but it would be nice to see a custom resample option for advanced user options.

The current resampler option in the UI allows a user to set a broad resample bit depth and sample rate for EVERY file regardless of any playback requirements. This is a great option, but limiting for advanced users. For example, resampling DSD, which is based on 44.1 multiples requires less effort from a processor if it’s divided by that multiple. For example, If a DAC supports 192kHz max, Volumio will always resample every DSD file to that sample rate. However, that extra math is unnecessary, adds nothing to the music, creates more heat on the processor, and can also detract from sound quality due the larger computation overhead.

Feature: A resample option to set a specific sample rate and bit depth based on the sample rate and bit depth of a current track.

Use cases:

  1. IF: Volumio defaults for bit-perfect PCM playback: A local file of 16 bit 44.1kHz, or 24 bit 192 kHz will play without conversion as it currently does, depending on DAC support.

  2. ELSE: DAC with no DSD or DoP support: Allow user to select a sample rate and bit depth per type of DSD file. If the file is DSD64, SoX will resample at the selected quality. Example: DSD64 file will be converted to 24 bit 88.2 at Low, / Medium / High / Very High, DSD128 at 24 bit 176.4 etc.

  3. ELSE: All conversion is as per normal, but allow user to set and make sure conversion quality is Low, Medium, High, or Very High depending on hardware.

Yes, I would also like the chance to do some “selective resampling”. My DAC seems to be a bit picky (pun not intended) and doesn’t like 16 bit PCM when playing via I2S. It takes DSD and 24-bit PCM just fine, so in my case, I would only like to up-convert from 16 to 24 bit, but leave every other PCM or DSD stream untouched.