Skip to content

Commit c98102e

Browse files
committedFeb 10, 2025
watch.c, ladspa_dsp.c: Turn off auto dither.
Call effects_chain_set_dither_params() to disable any dither effects which have 'bits' set to 'auto'.
1 parent ded9329 commit c98102e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed
 

‎README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ Example:
351351
not given, it is set to the same value as `bits` (rounded to the nearest
352352
integer).
353353

354-
**Note:** Currently, `auto` will not work correctly with `ladspa_dsp` or if
355-
loaded via `watch`. A default value of 16 is used in those cases.
354+
**Note:** Currently, setting `bits` to `auto` disables dither if the effect
355+
is loaded via `watch` or used in `ladspa_dsp`.
356356

357357
[1] S. P. Lipshitz, J. Vanderkooy, and R. A. Wannamaker,
358358
"Minimally Audible Noise Shaping," J. AES, vol. 39, no. 11,

‎dsp.1

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ bit depth regardless of the output sample format. \fIbits\fR may be any number.
380380
not given, it is set to the same value as \fIbits\fR (rounded to the nearest
381381
integer).
382382
.sp 0.5
383-
Note: Currently, \fIauto\fR will not work correctly with \fBladspa_dsp\fR or if
384-
loaded via \fBwatch\fR. A default value of 16 is used in those cases.
383+
Note: Currently, setting \fIbits\fR to \fIauto\fR disables dither if the effect
384+
is loaded via \fBwatch\fR or used in \fBladspa_dsp\fR.
385385
.sp 0.5
386386
.RS
387387
.IP [1] 4

‎ladspa_dsp.c

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ static LADSPA_Handle instantiate_dsp(const LADSPA_Descriptor *desc, unsigned lon
252252
LOG_S(LL_ERROR, "error: sample rate mismatch");
253253
goto fail;
254254
}
255+
effects_chain_set_dither_params(&d->chain, 0, 0); /* disable auto dither */
255256
return d;
256257

257258
fail:

‎watch.c

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ static void watch_reload(struct watch_node *node)
9999
}
100100
else {
101101
destroy_effects_chain(&node->new_chain);
102+
effects_chain_set_dither_params(&new_chain, 0, 0); /* disable auto dither */
102103
node->new_chain = new_chain;
103104
node->update_chain = 1;
104105
pthread_mutex_unlock(&node->lock);

0 commit comments

Comments
 (0)
Please sign in to comment.