We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50a971e commit 6237a14Copy full SHA for 6237a14
ports/espressif/common-hal/audiobusio/__init__.c
@@ -35,9 +35,14 @@
35
36
#include "shared-module/audiocore/__init__.h"
37
38
-#define CIRCUITPY_BUFFER_COUNT 3
39
-#define CIRCUITPY_BUFFER_SIZE 1023
40
-#define CIRCUITPY_OUTPUT_SLOTS 2
+// The maximum DMA buffer size (in bytes)
+#define I2S_DMA_BUFFER_MAX_SIZE 4092
+// The number of DMA buffers to allocate
41
+#define CIRCUITPY_BUFFER_COUNT (3)
42
+// The maximum DMA buffer size in frames (at stereo 16-bit)
43
+#define CIRCUITPY_BUFFER_SIZE (I2S_DMA_BUFFER_MAX_SIZE / 4)
44
+// The number of output channels is fixed at 2
45
+#define CIRCUITPY_OUTPUT_SLOTS (2)
46
47
static void i2s_fill_buffer(i2s_t *self) {
48
if (self->next_buffer_size == 0) {
0 commit comments