add resample

consumes A LOT of CPU. Need alos to change the command line to set the
sample rate (-r) to a fixed value (BT) but accept igher (-Z) from LMS
and enable resampling (-R)
-R -Z 96000 -r \"44100-44100\"  or similar
This commit is contained in:
philippe44
2019-06-22 15:43:04 -07:00
parent a55bac4306
commit 701c30a99b
8 changed files with 927 additions and 6 deletions

View File

@@ -329,14 +329,14 @@ static decode_state alac_decode(void) {
bytes = min(_buf_used(streambuf), _buf_cont_read(streambuf));
LOG_INFO("setting track_start");
LOCK_O_not_direct;
LOCK_O;
output.next_sample_rate = decode_newstream(l->sample_rate, output.supported_rates);
output.track_start = outputbuf->writep;
if (output.fade_mode) _checkfade(true);
decode.new_stream = false;
UNLOCK_O_not_direct;
UNLOCK_O;
} else if (found == -1) {
LOG_WARN("[%p]: error reading stream header");
UNLOCK_S;