32 #if not defined (CONTROL_RATE) 46 #define CONTROL_RATE 64
154 #define STANDARD_PLUS 1
160 #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 164 #define CLOCK_TICKS_PER_AUDIO_TICK (F_CPU / AUDIO_RATE) 168 #define AUDIO_RATE_AS_LSHIFT 14
169 #define MICROS_PER_AUDIO_TICK 61
171 #define AUDIO_RATE_AS_LSHIFT 15
172 #define MICROS_PER_AUDIO_TICK 31
177 #define EXTERNAL_AUDIO_OUTPUT false 182 #include "AudioConfigTeensy3_12bit.h" 184 #include "AudioConfigSTM32.h" 186 #include "AudioConfigESP.h" 188 #include "AudioConfigESP32.h" 190 #include "AudioConfigSAMD21.h" 192 #include "AudioConfigStandard9bitPwm.h" 194 #include "AudioConfigStandardPlus.h" 196 #include "AudioConfigHiSpeed14bitPwm.h" 199 #if !defined(EXTERNAL_AUDIO_BITS) 200 #define EXTERNAL_AUDIO_BITS 16
202 #define AUDIO_BITS EXTERNAL_AUDIO_BITS 203 #define AUDIO_BIAS (1
<< (AUDIO_BITS - 1
)) 207 extern int audio_out_1, audio_out_2;
213 typedef unsigned char uchar;
214 typedef unsigned int uint;
215 typedef unsigned long ulong;
218 typedef unsigned char byte;
219 typedef unsigned char uint8_t;
220 typedef signed char int8_t;
221 typedef unsigned int uint16_t;
222 typedef signed int int16_t;
223 typedef unsigned long uint32_t;
224 typedef signed long int32_t;
257 void startMozzi(
int control_rate_hz = CONTROL_RATE);
342 #if (USE_AUDIO_INPUT == true) 377 static void setupTimer2();
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 STEREO_HACK
This sets an option for stereo output, a hack which requires variables audio_signal_1 and audio_signa...
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().
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...