Remove obsolete functionality

This commit is contained in:
pschatzmann 2024-07-27 18:40:49 +02:00
parent 607c7228ed
commit 77eaf013d6
20 changed files with 37 additions and 29 deletions

View File

@ -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

View File

@ -12,7 +12,7 @@
AnalogAudioStream analog_in;
// Serial terminal output
CsvStream<int16_t> serial_out(Serial);
CsvOutput<int16_t> serial_out(Serial);
#define BAUD_RATE 500000
#define SAMPLE_RATE 44100

View File

@ -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,

View File

@ -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;
}

View File

@ -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
}

View File

@ -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

View File

@ -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<int16_t> csv(Serial, 1);
CsvOutput<int16_t> csv(Serial, 1);
//FilteredStream<int16_t, int16_t> filter(i2s, 1);
ResampleStream resample(csv); // replace with i2s
StreamCopy copier(resample, toneG8, 2048); // copies sound to out

View File

@ -7,7 +7,7 @@ AudioInfo from(44100, 2, 32);
AudioInfo to(44100, 2, 16);
SineWaveGenerator<int32_t> sineWave;
GeneratedSoundStream<int32_t> in(sineWave);
CsvStream<int16_t> out;
CsvOutput<int16_t> out;
FilteredStream<int16_t, float> filtered(out, from.channels);
NumberFormatConverterStream conv (filtered);
StreamCopy copier(conv, in);

View File

@ -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;

View File

@ -2,12 +2,13 @@
#include "AudioTools.h"
namespace mozzi_ns {
// prevent naming conflict with audiotools
#define AudioOutput AudioOutputMozzi
#include <Mozzi.h>
}
#undef AudioOutput
void updateControl();
mozzi_ns::AudioOutput updateAudio();
AudioOutputMozzi updateAudio();
namespace audio_tools {

View File

@ -599,6 +599,8 @@ protected:
};
// legacy name
#if USE_OBSOLETE
using RTSPStream = RTSPOutput;
#endif
} // namespace audio_tools

View File

@ -109,6 +109,8 @@ class MetaDataOutput : public AudioOutput {
};
// legacy name
#if USE_OBSOLETE
using MetaDataPrint = MetaDataOutput;
#endif
}

View File

@ -89,7 +89,9 @@ class PWMAudioOutput : public AudioOutput {
};
// legacy name
#if USE_OBSOLETE
using PWMAudioStream = PWMAudioOutput;
#endif
} // namespace audio_tools

View File

@ -228,7 +228,9 @@ protected:
};
// legacy name
#if USE_OBSOLETE
template <typename T> using CsvStream = CsvOutput<T>;
#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.

View File

@ -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;

View File

@ -389,9 +389,11 @@ class QueueStream : public BaseStream {
bool owns_buffer;
};
#if USE_OBSOLETE
// support legacy name
template <typename T>
using CallbackBufferedStream = QueueStream<T>;
#endif
#ifndef SWIG

View File

@ -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<int16_t> out(Serial, 2);
//CsvOutput<int16_t> out(Serial, 2);
EncodedAudioStream dec(&out, new AACDecoderFAAD()); // aac data source
StreamCopy copier(dec, aac); // copy in to out

View File

@ -17,7 +17,7 @@ SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
//I2SStream out;
PortAudioStream out;
//CsvStream<int16_t> out(Serial);
//CsvOutput<int16_t> 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);

View File

@ -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;

View File

@ -21,7 +21,7 @@ SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
//I2SStream out;
PortAudioStream out;
//CsvStream<int16_t> out(Serial);
//CsvOutput<int16_t> out(Serial);
#if USE_ADPCM
ADPCMDecoder adpcm_decoder(AV_CODEC_ID_ADPCM_IMA_WAV);
ADPCMEncoder adpcm_encoder(AV_CODEC_ID_ADPCM_IMA_WAV);