summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorReinhard Panhuber <[email protected]>2021-04-15 19:40:57 +0200
committerReinhard Panhuber <[email protected]>2021-04-15 19:40:57 +0200
commitc7e4a8616640165b48cfb0ba4f9346982faa4344 (patch)
treed2150f054d76a12f08effe0731acf757934d9512 /examples/device
parent9ecb91e1bd0ac54c759ac1e91a0714c5a8c49172 (diff)
Fix bug in audio_4_channel_mic.c
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/audio_4_channel_mic/src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/device/audio_4_channel_mic/src/main.c b/examples/device/audio_4_channel_mic/src/main.c
index 99e850dcc..983b87e5b 100644
--- a/examples/device/audio_4_channel_mic/src/main.c
+++ b/examples/device/audio_4_channel_mic/src/main.c
@@ -400,7 +400,7 @@ bool tud_audio_tx_done_pre_load_cb(uint8_t rhport, uint8_t itf, uint8_t ep_in, u
for (uint8_t cnt=0; cnt < CFG_TUD_AUDIO_FUNC_1_N_TX_SUPP_SW_FIFO; cnt++)
{
- tud_audio_write_support_ff(cnt, i2s_dummy_buffer[cnt], AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX);
+ tud_audio_write_support_ff(cnt, i2s_dummy_buffer[cnt], AUDIO_SAMPLE_RATE/1000 * CFG_TUD_AUDIO_FUNC_1_N_BYTES_PER_SAMPLE_TX * CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX);
}
return true;
@@ -423,7 +423,7 @@ bool tud_audio_tx_done_post_load_cb(uint8_t rhport, uint16_t n_bytes_copied, uin
dataVal = 1;
for (uint16_t cnt2 = 0; cnt2 < AUDIO_SAMPLE_RATE/1000; cnt2++)
{
- for (uint8_t cnt3 = 0; cnt3 < CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX; cnt++)
+ for (uint8_t cnt3 = 0; cnt3 < CFG_TUD_AUDIO_FUNC_1_CHANNEL_PER_FIFO_TX; cnt3++)
{
*p_buff++ = dataVal;
}