#include "AudioTools.h" AudioInfo info(44100, 1, 16); // subclass of SoundGenerator with max amplitude of 32000 SineWaveGenerator sineWave(32000); // Stream generated from sine wave GeneratedSoundStream sound(sineWave); CsvOutput out(Serial); //ResampleStreamT resample(out); ResampleStreamT resample(sound); StreamCopy copier(out, resample); // copies sound to out // Arduino Setup void setup(void) { // Open Serial Serial.begin(115200); AudioToolsLogger.begin(Serial, AudioToolsLogLevel::Warning); // define resample auto rcfg = resample.defaultConfig(); rcfg.copyFrom(info); rcfg.step_size = 0.5; resample.begin(rcfg); // Define CSV Output out.begin(info); // Setup sine wave sineWave.begin(info, N_B4); Serial.println("started..."); } // Arduino loop - copy sound to out void loop() { copier.copy(); }