summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJerzy Kasenberg <[email protected]>2020-09-11 13:18:11 +0200
committerJerzy Kasenberg <[email protected]>2020-09-28 08:41:17 +0200
commitca4a42156ceeb8dd6b70edc02b2b762645c62c66 (patch)
tree8ddc331e4b177c6ebca1cf552898f7af2716b748 /src
parent66b091282f31275fff859c4cf61c3026215a3db7 (diff)
audio_device: Fix audio_rx_done_type_I_pcm_ff_cb bufor size check
Function was not checking buffer size correctly due missing parenthesis.
Diffstat (limited to 'src')
-rw-r--r--src/class/audio/audio_device.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/class/audio/audio_device.c b/src/class/audio/audio_device.c
index f83f395a8..23a2cea96 100644
--- a/src/class/audio/audio_device.c
+++ b/src/class/audio/audio_device.c
@@ -288,7 +288,8 @@ static bool audio_rx_done_type_I_pcm_ff_cb(uint8_t rhport, audiod_interface_t* a
(void) rhport;
// We expect to get a multiple of CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX * CFG_TUD_AUDIO_N_CHANNELS_RX per channel
- if (bufsize % CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX*CFG_TUD_AUDIO_N_CHANNELS_RX != 0) {
+ if (bufsize % (CFG_TUD_AUDIO_N_BYTES_PER_SAMPLE_RX * CFG_TUD_AUDIO_N_CHANNELS_RX) != 0)
+ {
return false;
}