diff --git a/examples/build-examples-log.txt b/examples/build-examples-log.txt index 58f9ebe8f..51e8dabfe 100644 --- a/examples/build-examples-log.txt +++ b/examples/build-examples-log.txt @@ -191,7 +191,7 @@ ../examples/examples-communication/http-client/player-url_icy-audiokit -> rc=0 ../examples/examples-communication/http-client/player-url_icy-i2s -> rc=0 ../examples/examples-communication/http-client/player-url_subclass-i2s -> rc=0 -../examples/examples-communication/http-client/streams-eth_url_mp3_helix-i2s -> rc=0 +../examples/examples-communication/http-client/streams-eth_url_mp3_helix-i2s -> rc=1 ../examples/examples-communication/http-client/streams-http_post -> rc=0 ../examples/examples-communication/http-client/streams-url_aac-audiokit -> rc=0 ../examples/examples-communication/http-client/streams-url_aac-i2s -> rc=0 @@ -216,7 +216,7 @@ ../examples/examples-communication/http-server/streams-audiokit-webserver_mp3 -> rc=0 ../examples/examples-communication/http-server/streams-audiokit-webserver_wav -> rc=0 ../examples/examples-communication/http-server/streams-effect-webserver_wav -> rc=0 -../examples/examples-communication/http-server/streams-flite-webserver_wav -> rc=0 +../examples/examples-communication/http-server/streams-flite-webserver_wav -> rc=1 ../examples/examples-communication/http-server/streams-generator-webserver_aac -> rc=0 ../examples/examples-communication/http-server/streams-generator-webserverex_wav -> rc=0 ../examples/examples-communication/http-server/streams-generator-webserverex_wav1 -> rc=0 @@ -228,6 +228,7 @@ ../examples/examples-communication/http-server/streams-tts-webserver_wav -> rc=0 ../examples/tests/adc/read-csv -> rc=0 ../examples/tests/adc/read-csv_unsigned -> rc=0 +../examples/tests/adc/read-esp32-multi-channel-csv -> rc=0 ../examples/tests/adc/read-speed -> rc=0 ../examples/tests/basic/24bits-write -> rc=0 ../examples/tests/basic/test-allocator -> rc=0 @@ -259,6 +260,9 @@ ../examples/tests/codecs/test-memory-helix -> rc=0 ../examples/tests/codecs/test-mp3-helix -> rc=0 ../examples/tests/codecs/test-mp3-helix-reading -> rc=0 +../examples/tests/codecs/test-mp3-mad -> rc=0 +../examples/tests/codecs/test-streaming-adapter -> rc=0 +../examples/tests/communications/* -> rc=1 ../examples/tests/concurrency/NBuffer -> rc=0 ../examples/tests/concurrency/synchBufferRTOS -> rc=0 ../examples/tests/concurrency/synchNBuffer -> rc=0 diff --git a/examples/examples-basic-api/base-adc-average-mono-serial/base-adc-average-mono-serial.ino b/examples/examples-basic-api/base-adc-average-mono-serial/base-adc-average-mono-serial.ino index 9cbfc2db2..58994fae1 100644 --- a/examples/examples-basic-api/base-adc-average-mono-serial/base-adc-average-mono-serial.ino +++ b/examples/examples-basic-api/base-adc-average-mono-serial/base-adc-average-mono-serial.ino @@ -12,7 +12,7 @@ AnalogAudioStream analog_in; // Serial terminal output -CsvStream serial_out(Serial); +CsvOutput serial_out(Serial); #define BAUD_RATE 500000 #define SAMPLE_RATE 44100 diff --git a/examples/examples-dsp/examples-mozzi/audio_input/audio_input.ino b/examples/examples-dsp/examples-mozzi/audio_input/audio_input.ino index 06b579265..f713b0836 100644 --- a/examples/examples-dsp/examples-mozzi/audio_input/audio_input.ino +++ b/examples/examples-dsp/examples-mozzi/audio_input/audio_input.ino @@ -43,7 +43,7 @@ void setup() { void updateControl() {} -mozzi_ns::AudioOutput updateAudio() { +AudioOutputMozzi updateAudio() { int asig = mozzi.getAudioInput(); // range 0-1023 asig = asig - 512; // now range is -512 to 511 // output range in STANDARD mode is -244 to 243, diff --git a/examples/examples-dsp/examples-mozzi/control_gain-a2dp/control_gain-a2dp.ino b/examples/examples-dsp/examples-mozzi/control_gain-a2dp/control_gain-a2dp.ino index 788ab5c26..0a4074fad 100644 --- a/examples/examples-dsp/examples-mozzi/control_gain-a2dp/control_gain-a2dp.ino +++ b/examples/examples-dsp/examples-mozzi/control_gain-a2dp/control_gain-a2dp.ino @@ -53,7 +53,7 @@ void updateControl() { gain = gain - 3; } -mozzi_ns::AudioOutput updateAudio() { +AudioOutputMozzi updateAudio() { // shift back to STANDARD audio range, like /256 but faster return (aSin.next() * gain) >> 8; } diff --git a/examples/examples-dsp/examples-mozzi/control_gain/control_gain.ino b/examples/examples-dsp/examples-mozzi/control_gain/control_gain.ino index 6d8cef90b..04e400054 100644 --- a/examples/examples-dsp/examples-mozzi/control_gain/control_gain.ino +++ b/examples/examples-dsp/examples-mozzi/control_gain/control_gain.ino @@ -46,7 +46,7 @@ void updateControl() { gain = gain - 3; } -mozzi_ns::AudioOutput updateAudio() { +AudioOutputMozzi updateAudio() { return (aSin.next() * gain) >> 8; // shift back to STANDARD audio range, like /256 but faster } \ No newline at end of file diff --git a/examples/examples-stream/streams-generator-volume/streams-generator-volume.ino b/examples/examples-stream/streams-generator-volume/streams-generator-volume.ino index 45bed2d76..68030554f 100644 --- a/examples/examples-stream/streams-generator-volume/streams-generator-volume.ino +++ b/examples/examples-stream/streams-generator-volume/streams-generator-volume.ino @@ -20,7 +20,7 @@ void setup(void) { while(!Serial); AudioLogger::instance().begin(Serial, AudioLogger::Warning); - // start Volume Output + // start Volume Meter out.begin(info); // Setup sine wave diff --git a/examples/sandbox/streams-memory_wav-resample-audiokit/streams-memory_wav-resample-audiokit.ino b/examples/sandbox/streams-memory_wav-resample-audiokit/streams-memory_wav-resample-audiokit.ino index ea37f64d6..51a072281 100644 --- a/examples/sandbox/streams-memory_wav-resample-audiokit/streams-memory_wav-resample-audiokit.ino +++ b/examples/sandbox/streams-memory_wav-resample-audiokit/streams-memory_wav-resample-audiokit.ino @@ -9,7 +9,7 @@ MemoryStream toneG8(g8_sine_raw, g8_sine_raw_len); // playback at 24000 (4 times slower) const AudioInfo info(24000,1,16); AudioBoardStream i2s(AudioKitEs8388V1); -CsvStream csv(Serial, 1); +CsvOutput csv(Serial, 1); //FilteredStream filter(i2s, 1); ResampleStream resample(csv); // replace with i2s StreamCopy copier(resample, toneG8, 2048); // copies sound to out diff --git a/examples/tests/filters/test-90deg/test-90deg.ino b/examples/tests/filters/test-90deg/test-90deg.ino index 44a34b43e..f47eb1431 100644 --- a/examples/tests/filters/test-90deg/test-90deg.ino +++ b/examples/tests/filters/test-90deg/test-90deg.ino @@ -7,7 +7,7 @@ AudioInfo from(44100, 2, 32); AudioInfo to(44100, 2, 16); SineWaveGenerator sineWave; GeneratedSoundStream in(sineWave); -CsvStream out; +CsvOutput out; FilteredStream filtered(out, from.channels); NumberFormatConverterStream conv (filtered); StreamCopy copier(conv, in); diff --git a/src/AudioCodecs/AudioCodecsBase.h b/src/AudioCodecs/AudioCodecsBase.h index e24f8d428..683775bb1 100644 --- a/src/AudioCodecs/AudioCodecsBase.h +++ b/src/AudioCodecs/AudioCodecsBase.h @@ -184,11 +184,6 @@ class StreamingDecoder : public AudioInfoSource { /// the loop void setInput(Stream &inStream) { this->p_input = &inStream; } -#if USE_OBSOLETE - /// Obsolete: same as setInput - void setInputStream(Stream &inStream) { setInput(inStream); } -#endif - /// Provides the last available MP3FrameInfo virtual AudioInfo audioInfo() = 0; diff --git a/src/AudioLibs/MozziStream.h b/src/AudioLibs/MozziStream.h index ae0a8f05d..212415323 100644 --- a/src/AudioLibs/MozziStream.h +++ b/src/AudioLibs/MozziStream.h @@ -2,12 +2,13 @@ #include "AudioTools.h" -namespace mozzi_ns { +// prevent naming conflict with audiotools +#define AudioOutput AudioOutputMozzi #include -} +#undef AudioOutput void updateControl(); -mozzi_ns::AudioOutput updateAudio(); +AudioOutputMozzi updateAudio(); namespace audio_tools { diff --git a/src/AudioLibs/RTSP.h b/src/AudioLibs/RTSP.h index 5941f6347..676c0ae58 100644 --- a/src/AudioLibs/RTSP.h +++ b/src/AudioLibs/RTSP.h @@ -599,6 +599,8 @@ protected: }; // legacy name +#if USE_OBSOLETE using RTSPStream = RTSPOutput; +#endif } // namespace audio_tools diff --git a/src/AudioMetaData/MetaData.h b/src/AudioMetaData/MetaData.h index 544bb3b28..6e13653b8 100644 --- a/src/AudioMetaData/MetaData.h +++ b/src/AudioMetaData/MetaData.h @@ -109,6 +109,8 @@ class MetaDataOutput : public AudioOutput { }; // legacy name +#if USE_OBSOLETE using MetaDataPrint = MetaDataOutput; +#endif } \ No newline at end of file diff --git a/src/AudioPWM/AudioPWM.h b/src/AudioPWM/AudioPWM.h index dc89e97cf..3ee80404c 100644 --- a/src/AudioPWM/AudioPWM.h +++ b/src/AudioPWM/AudioPWM.h @@ -89,7 +89,9 @@ class PWMAudioOutput : public AudioOutput { }; // legacy name +#if USE_OBSOLETE using PWMAudioStream = PWMAudioOutput; +#endif } // namespace audio_tools diff --git a/src/AudioTools/AudioOutput.h b/src/AudioTools/AudioOutput.h index c58572807..ca6c6c009 100644 --- a/src/AudioTools/AudioOutput.h +++ b/src/AudioTools/AudioOutput.h @@ -228,7 +228,9 @@ protected: }; // legacy name +#if USE_OBSOLETE template using CsvStream = CsvOutput; +#endif /** * @brief Creates a Hex Dump @@ -292,7 +294,9 @@ protected: }; // legacy name +#if USE_OBSOLETE using HexDumpStream = HexDumpOutput; +#endif /** * @brief Mixing of multiple outputs to one final output @@ -602,7 +606,9 @@ protected: }; // legacy name +#if USE_OBSOLETE using MemoryPrint = MemoryOutput; +#endif /** * @brief Simple functionality to extract mono streams from a multichannel (e.g. diff --git a/src/AudioTools/AudioTypes.h b/src/AudioTools/AudioTypes.h index 520a9824d..46f823fc4 100644 --- a/src/AudioTools/AudioTypes.h +++ b/src/AudioTools/AudioTypes.h @@ -144,10 +144,11 @@ class AudioInfoSupport { virtual AudioInfo audioInfoOut() { return audioInfo();} }; // Support legacy name +#if USE_OBSOLETE using AudioBaseInfo = AudioInfo; using AudioBaseInfoDependent = AudioInfoSupport; using AudioInfoDependent = AudioInfoSupport; - +#endif /** * @brief Supports the subscription to audio change notifications @@ -173,13 +174,6 @@ class AudioInfoSource { notify_vector.clear(); } -#if USE_OBSOLETE - /// Obsolete: Use addNotifyAudioChange - virtual void setNotifyAudioChange(AudioInfoSupport &bi) { - addNotifyAudioChange(bi); - } -#endif - /// Deactivate/Reactivate automatic AudioInfo updates: (default is active) void setNotifyActive(bool flag){ is_notify_active = flag; diff --git a/src/AudioTools/BaseStream.h b/src/AudioTools/BaseStream.h index 5e3391a14..cf13281c6 100644 --- a/src/AudioTools/BaseStream.h +++ b/src/AudioTools/BaseStream.h @@ -389,9 +389,11 @@ class QueueStream : public BaseStream { bool owns_buffer; }; +#if USE_OBSOLETE // support legacy name template using CallbackBufferedStream = QueueStream; +#endif #ifndef SWIG diff --git a/tests-cmake/codec/aac-faad/aac-faad.cpp b/tests-cmake/codec/aac-faad/aac-faad.cpp index be2cdec5d..d0058d93e 100644 --- a/tests-cmake/codec/aac-faad/aac-faad.cpp +++ b/tests-cmake/codec/aac-faad/aac-faad.cpp @@ -8,7 +8,7 @@ using namespace audio_tools; MemoryStream aac(gs_16b_2c_44100hz_aac, gs_16b_2c_44100hz_aac_len); PortAudioStream out; // Output of sound on desktop -//CsvStream out(Serial, 2); +//CsvOutput out(Serial, 2); EncodedAudioStream dec(&out, new AACDecoderFAAD()); // aac data source StreamCopy copier(dec, aac); // copy in to out diff --git a/tests-cmake/codec/adpcm/adpcm.cpp b/tests-cmake/codec/adpcm/adpcm.cpp index 234a771a4..e6e1d0211 100644 --- a/tests-cmake/codec/adpcm/adpcm.cpp +++ b/tests-cmake/codec/adpcm/adpcm.cpp @@ -17,7 +17,7 @@ SineWaveGenerator sineWave( 32000); // subclass of SoundGenerator with GeneratedSoundStream sound( sineWave); // Stream generated from sine wave //I2SStream out; PortAudioStream out; -//CsvStream out(Serial); +//CsvOutput out(Serial); EncodedAudioStream decoder(&out, new ADPCMDecoder(AV_CODEC_ID_ADPCM_IMA_WAV)); // encode and write EncodedAudioStream encoder(&decoder, new ADPCMEncoder(AV_CODEC_ID_ADPCM_IMA_WAV)); // encode and write StreamCopy copier(encoder, sound); diff --git a/tests-cmake/codec/mp3-metadata/mp3-metadata.cpp b/tests-cmake/codec/mp3-metadata/mp3-metadata.cpp index 5ab2f51fb..c17b75f27 100644 --- a/tests-cmake/codec/mp3-metadata/mp3-metadata.cpp +++ b/tests-cmake/codec/mp3-metadata/mp3-metadata.cpp @@ -6,7 +6,7 @@ using namespace audio_tools; MemoryStream mp3(sample_12s_mp3, sample_12s_mp3_len); -MetaDataPrint out; +MetaDataOutput out; StreamCopy copier(out, mp3); // copy in to out bool title_printed = false; diff --git a/tests-cmake/codec/wav/wav.cpp b/tests-cmake/codec/wav/wav.cpp index 3a8eaf04f..3d514ac1b 100644 --- a/tests-cmake/codec/wav/wav.cpp +++ b/tests-cmake/codec/wav/wav.cpp @@ -21,7 +21,7 @@ SineWaveGenerator sineWave( 32000); // subclass of SoundGenerator with GeneratedSoundStream sound( sineWave); // Stream generated from sine wave //I2SStream out; PortAudioStream out; -//CsvStream out(Serial); +//CsvOutput out(Serial); #if USE_ADPCM ADPCMDecoder adpcm_decoder(AV_CODEC_ID_ADPCM_IMA_WAV); ADPCMEncoder adpcm_encoder(AV_CODEC_ID_ADPCM_IMA_WAV);