Skip to content

Commit e50f985

Browse files
committed
tweaks for USB audio
1 parent 37ad11b commit e50f985

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/pdm-microphone.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include "pico/microphone/pdm.h"
1717

1818
#define PDM_DECIMATION 64
19-
#define PCM_BUFFER_SIZE 256
19+
#define PCM_BUFFER_SIZE 16
2020

2121
static int dma_channel = -1;
2222
static uint8_t pdm_buffer[2][PCM_BUFFER_SIZE * (PDM_DECIMATION / 8)];
@@ -47,9 +47,9 @@ static void dma_handler()
4747

4848
for (int i = 0; i < (PCM_BUFFER_SIZE / filter_stride); i++) {
4949
#if PDM_DECIMATION == 64
50-
Open_PDM_Filter_64(in, out, 1, &pdm_filter);
50+
Open_PDM_Filter_64(in, out, 16, &pdm_filter);
5151
#elif PDM_DECIMATION == 128
52-
Open_PDM_Filter_128(in, out, 1, &pdm_filter);
52+
Open_PDM_Filter_128(in, out, 16, &pdm_filter);
5353
#else
5454
#error "Unsupported PDM_DECIMATION value!"
5555
#endif

0 commit comments

Comments
 (0)