Skip to content

Commit 3961680

Browse files
committed
Small progress towards fixing audio Input in RP2040
1 parent 117120e commit 3961680

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

internal/MozziGuts.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ uint64_t samples_written_to_buffer = 0;
8484
inline void bufferAudioOutput(const AudioOutput f) {
8585
audioOutput(f);
8686
++samples_written_to_buffer;
87+
#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
88+
MOZZI_ASSERT_NOTEQUAL(MOZZI_ANALOG_READ, MOZZI_ANALOG_READ_NONE);
89+
adc_count = 0;
90+
startSecondADCReadOnCurrentChannel();
91+
#endif
92+
93+
8794
}
8895
#else
8996
CircularBuffer<AudioOutput> output_buffer; // fixed size 256

0 commit comments

Comments
 (0)