diff --git a/internal/MozziGuts.hpp b/internal/MozziGuts.hpp index 660171f28..a3fd88b00 100644 --- a/internal/MozziGuts.hpp +++ b/internal/MozziGuts.hpp @@ -84,6 +84,13 @@ uint64_t samples_written_to_buffer = 0; inline void bufferAudioOutput(const AudioOutput f) { audioOutput(f); ++samples_written_to_buffer; + #if MOZZI_IS(MOZZI__LEGACY_AUDIO_INPUT_IMPL, 1) // in that case, we rely on asynchroneous ADC reads implemented for mozziAnalogRead to get the audio in samples + MOZZI_ASSERT_NOTEQUAL(MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE); + adc_count = 0; + startSecondADCReadOnCurrentChannel(); + #endif + + } #else CircularBuffer output_buffer; // fixed size 256 diff --git a/internal/config_checks_rp2040.h b/internal/config_checks_rp2040.h index 5ba884415..4e1382dac 100644 --- a/internal/config_checks_rp2040.h +++ b/internal/config_checks_rp2040.h @@ -125,6 +125,6 @@ MOZZI_CHECK_SUPPORTED(MOZZI_I2S_FORMAT, MOZZI_I2S_FORMAT_PLAIN, MOZZI_I2S_FORMAT #define MOZZI__INTERNAL_ANALOG_READ_RESOLUTION 12 MOZZI_CHECK_SUPPORTED(MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE, MOZZI_ANALOG_READ_STANDARD) -MOZZI_CHECK_SUPPORTED(MOZZI_AUDIO_INPUT, MOZZI_AUDIO_INPUT_NONE, MOZZI_ANALOG_READ_STANDARD) +MOZZI_CHECK_SUPPORTED(MOZZI_AUDIO_INPUT, MOZZI_AUDIO_INPUT_NONE, MOZZI_AUDIO_INPUT_STANDARD) #endif // #ifndef CONFIG_CHECK_RP2040_H