From f9eaaba5acf1afc4d5c3ea566fb19e9186d8cab3 Mon Sep 17 00:00:00 2001 From: Grzegorz Bernat Date: Tue, 14 May 2024 15:22:11 +0200 Subject: [PATCH] Audio: Volume: fix problem with generic peakVol Fixed a problem with generic implementation of function vol_passthrough_s16_to_s16. Corrected Pointer Types. Variables x and y are treated as int16_t pointers since we are dealing with 16-bit samples. That was tested in test: test_01_09_peakvol_quality[44100Hz_16in16bit_1ch-0] Signed-off-by: Grzegorz Bernat --- src/audio/volume/volume_generic_with_peakvol.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio/volume/volume_generic_with_peakvol.c b/src/audio/volume/volume_generic_with_peakvol.c index 2f257d2ef..106e1d3c7 100644 --- a/src/audio/volume/volume_generic_with_peakvol.c +++ b/src/audio/volume/volume_generic_with_peakvol.c @@ -338,8 +338,8 @@ static void vol_passthrough_s16_to_s16(struct processing_module *mod, struct vol_data *cd = module_get_private_data(mod); struct audio_stream *source = bsource->data; struct audio_stream *sink = bsink->data; - int32_t *x, *x0; - int32_t *y, *y0; + int16_t *x, *x0; + int16_t *y, *y0; int nmax, n, i, j; const int nch = audio_stream_get_channels(source); int remaining_samples = frames * nch;