Skip to content

Commit 3d6c5ea

Browse files
committed
Added generic config
1 parent 1c46911 commit 3d6c5ea

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

internal/config_checks_generic.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@
7878
#define MOZZI_AUDIO_INPUT_PIN 0
7979
#endif
8080

81+
#if not defined(MOZZI_OUTPUT_BUFFER_SIZE)
82+
#define MOZZI_OUTPUT_BUFFER_SIZE 256
83+
#endif
84+
8185
//MOZZI_PWM_RATE -> hardware specific
8286
//MOZZI_AUDIO_PIN_1 -> hardware specific
8387
//MOZZI_AUDIO_PIN_1_LOW -> hardware specific
@@ -121,6 +125,10 @@
121125
/// Step 3: Apply various generic checks that make sense on more than one platform
122126
MOZZI_CHECK_POW2(MOZZI_AUDIO_RATE)
123127
MOZZI_CHECK_POW2(MOZZI_CONTROL_RATE)
128+
MOZZI_CHECK_POW2(MOZZI_OUTPUT_BUFFER_SIZE)
129+
#if (MOZZI_OUTPUT_BUFFER_SIZE > 256)
130+
#error "Mozzi does not support buffer sizes greated than 256 at the moment"
131+
#endif
124132

125133
#if MOZZI_IS(MOZZI_AUDIO_INPUT, MOZZI_AUDIO_INPUT_STANDARD) && MOZZI_IS(MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE)
126134
#error "MOZZI_AUDIO_INPUT depends on MOZZI_ANALOG_READ option"

0 commit comments

Comments
 (0)