mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 12:37:01 +03:00
tune libsoxr
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -64,3 +64,4 @@ $RECYCLE.BIN/
|
|||||||
libs/
|
libs/
|
||||||
|
|
||||||
/cdump.cmd
|
/cdump.cmd
|
||||||
|
/_codecs
|
||||||
|
|||||||
Binary file not shown.
@@ -190,6 +190,7 @@ bool resample_newstream(struct processstate *process, unsigned raw_sample_rate,
|
|||||||
|
|
||||||
#if BYTES_PER_FRAME == 4
|
#if BYTES_PER_FRAME == 4
|
||||||
io_spec = SOXR(r, io_spec, SOXR_INT16_I, SOXR_INT16_I);
|
io_spec = SOXR(r, io_spec, SOXR_INT16_I, SOXR_INT16_I);
|
||||||
|
io_spec.flags = SOXR_NO_DITHER;
|
||||||
#else
|
#else
|
||||||
io_spec = SOXR(r, io_spec, SOXR_INT32_I, SOXR_INT32_I);
|
io_spec = SOXR(r, io_spec, SOXR_INT32_I, SOXR_INT32_I);
|
||||||
#endif
|
#endif
|
||||||
@@ -307,22 +308,23 @@ bool resample_init(char *opt) {
|
|||||||
phase_response = next_param(NULL, ':');
|
phase_response = next_param(NULL, ':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#if BYTES_PER_FRAME == 4
|
#if BYTES_PER_FRAME == 4
|
||||||
// default to LQ (16 bit) if not user specified
|
// default to LQ (16 bits) if not user specified
|
||||||
r->q_recipe = SOXR_LQ;
|
r->q_recipe = SOXR_LQ | SOXR_MINIMUM_PHASE;
|
||||||
|
r->q_flags = SOXR_ROLLOFF_NONE;
|
||||||
|
r->q_phase_response = 0;
|
||||||
#else
|
#else
|
||||||
// default to HQ (20 bit) if not user specified
|
// default to HQ (20 bits) if not user specified
|
||||||
r->q_recipe = SOXR_HQ;
|
r->q_recipe = SOXR_HQ;
|
||||||
#endif
|
|
||||||
r->q_flags = 0;
|
r->q_flags = 0;
|
||||||
|
r->q_phase_response = -1;
|
||||||
|
#endif
|
||||||
// default to 1db of attenuation if not user specified
|
// default to 1db of attenuation if not user specified
|
||||||
r->scale = pow(10, -1.0 / 20);
|
r->scale = pow(10, -1.0 / 20);
|
||||||
// override recipe derived values with user specified values
|
// override recipe derived values with user specified values
|
||||||
r->q_precision = 0;
|
r->q_precision = 0;
|
||||||
r->q_passband_end = 0;
|
r->q_passband_end = 0;
|
||||||
r->q_stopband_begin = 0;
|
r->q_stopband_begin = 0;
|
||||||
r->q_phase_response = -1;
|
|
||||||
|
|
||||||
if (recipe && recipe[0] != '\0') {
|
if (recipe && recipe[0] != '\0') {
|
||||||
if (strchr(recipe, 'v')) r->q_recipe = SOXR_VHQ;
|
if (strchr(recipe, 'v')) r->q_recipe = SOXR_VHQ;
|
||||||
|
|||||||
Reference in New Issue
Block a user