32 #if not defined (CONTROL_RATE) 46 #define CONTROL_RATE 64
165 #define STANDARD_PLUS 1
175 #error AUDIO_RATE 32768
does not work when AUDIO_MODE is STANDARD, try setting the AUDIO_MODE to STANDARD_PLUS in Mozzi/mozzi_config.h 178 #if (STEREO_HACK == true) 179 #warning Use of STEREO_HACK is deprecated. Use AUDIO_CHANNELS STEREO, instead. 180 #define AUDIO_CHANNELS STEREO 183 #define AUDIO_CHANNELS MONO 186 #define CLOCK_TICKS_PER_AUDIO_TICK (F_CPU / AUDIO_RATE) 190 #define AUDIO_RATE_AS_LSHIFT 14
191 #define MICROS_PER_AUDIO_TICK 61
193 #define AUDIO_RATE_AS_LSHIFT 15
194 #define MICROS_PER_AUDIO_TICK 31
199 #define EXTERNAL_AUDIO_OUTPUT false 204 #include "AudioConfigTeensy3_12bit.h" 206 #include "AudioConfigTeensy4.h" 208 #include "AudioConfigSTM32.h" 210 #include "AudioConfigESP.h" 212 #include "AudioConfigESP32.h" 214 #include "AudioConfigSAMD21.h" 216 #include "AudioConfigRP2040.h" 218 #include "AudioConfigStandard9bitPwm.h" 220 #include "AudioConfigStandardPlus.h" 222 #include "AudioConfigHiSpeed14bitPwm.h" 225 #if !defined(EXTERNAL_AUDIO_BITS) 226 #define EXTERNAL_AUDIO_BITS 16
228 #define AUDIO_BITS EXTERNAL_AUDIO_BITS 229 #define AUDIO_BIAS (1
<< (AUDIO_BITS - 1
)) 232 #if (STEREO_HACK == true) 233 extern int audio_out_1, audio_out_2;
239 typedef unsigned char uchar;
240 typedef unsigned int uint;
241 typedef unsigned long ulong;
244 typedef unsigned char byte;
245 typedef unsigned char uint8_t;
246 typedef signed char int8_t;
247 typedef unsigned int uint16_t;
248 typedef signed int int16_t;
249 typedef unsigned long uint32_t;
250 typedef signed long int32_t;
283 void startMozzi(
int control_rate_hz = CONTROL_RATE);
368 #if (USE_AUDIO_INPUT == true) unsigned long mozziMicros()
An alternative for Arduino time functions like micros() and millis().
void stopMozzi()
Stops audio and control interrupts and restores the timers to the values they had before Mozzi was st...
#define AUDIO_MODE
AUDIO_MODE holds the audio mode setting.
#define AUDIO_CHANNELS
This sets allows to change from a single/mono audio output channel to stereo output.
AudioOutput_t updateAudio()
This is where you put your audio code.
void updateControl()
This is where you put your control code.
#define AUDIO_RATE
Holds the audio rate setting.
void audioHook()
This is required in Arduino's loop().
void unPauseMozzi()
Obsolete function, use startMozzi() instead.
unsigned long audioTicks()
An alternative for Arduino time functions like micros() and millis().
#define AudioOutput_t
Representation of an single audio output sample/frame.
void pauseMozzi()
Obsolete function, use stopMozzi() instead.
void startMozzi(int control_rate_hz=CONTROL_RATE)
Sets up the timers for audio and control rate processes, storing the timer registers so they can be r...
#define STANDARD
Used to set AUDIO_MODE to STANDARD, STANDARD_PLUS, or HIFI.
#define EXTERNAL_AUDIO_OUTPUT
Defining this option as true in mozzi_config.h allows to completely customize the audio output...