You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: config/mozzi_config_documentation.h
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -249,6 +249,22 @@
249
249
* */
250
250
#defineMOZZI_AUDIO_PIN_1 FOR_DOXYGEN_ONLY
251
251
252
+
/** @ingroup config
253
+
* @def MOZZI_OUTPUT_BUFFER_SIZE
254
+
*
255
+
* @brief Audio buffer setting.
256
+
*
257
+
* For a lot of outputting modes, Mozzi is buffering the audio samples in order to be able to coop with varying loads on the processor.
258
+
* The bigger the buffer, the more able Mozzi will be to coop with big change of processor loads as the buffered values can compensate for that.
259
+
* At the same time, a bigger buffer produces a bigger latency as the time between when Mozzi produces the sample and the time it is actually outputted increases. For instance, for a long time Mozzi's buffer size was of a fixed size of 256. This produces a potential latency of 15.6 ms for a MOZZI_AUDIO_RATE of 16384, and half this value for a MOZZI_AUDIO_RATE of 32768.
260
+
* Depending on the application, this is usually not a problem but can lead to synchronisation issues in some cases (for instance when working with clocks).
261
+
* MOZZI_OUTPUT_BUFFER_SIZE can be reduced to smaller values with this config, leading to more accurate timings but potentially to glitches if the buffer runs low.
262
+
* Valid values are power of two from 256 downward (128, 64, …).
263
+
* Note that this might not have an effect in all modes/platforms combination as Mozzi is sometimes using an external buffer which is not always configurable.
/** NOTE: Triggered at MOZZI_AUDIO_RATE via defaultAudioOutput(). In addition to the MOZZI_AUDIO_INPUT_PIN, at most one reading is taken for mozziAnalogRead(). */
// All modes besides timed external bypass the output buffer!
120
+
// All modes besides timed external bypass the output buffer! In these modes, the buffer size is not configurable at the moment: throw an error if the user tries to change it.
0 commit comments