From 3e391b1a4db65f220307f7fca8b34a152baadca5 Mon Sep 17 00:00:00 2001 From: Marcin Rajwa Date: Thu, 16 May 2019 08:50:25 +0200 Subject: [PATCH] detector: fix bug of incorrect amount of samples in detecting function This patch solves the issue with wrong number of bytes being passed to detecting function therefore causing a loss of recorded data. Signed-off-by: Marcin Rajwa --- src/audio/detect_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/audio/detect_test.c b/src/audio/detect_test.c index 249b9d7a94ca..db4496daf3c3 100644 --- a/src/audio/detect_test.c +++ b/src/audio/detect_test.c @@ -613,7 +613,7 @@ static int test_keyword_copy(struct comp_dev *dev) /* copy and perform detection */ cd->detect_func(dev, source, - source->avail / comp_frame_bytes(source->source)); + source->avail / comp_frame_bytes(dev)); /* calc new available */ comp_update_buffer_consume(source, source->avail);