mirror of
https://github.com/pschatzmann/arduino-audio-tools.git
synced 2024-09-21 10:27:27 +00:00
Remove obsolete functionality
This commit is contained in:
parent
607c7228ed
commit
77eaf013d6
@ -191,7 +191,7 @@
|
|||||||
../examples/examples-communication/http-client/player-url_icy-audiokit -> rc=0
|
../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_icy-i2s -> rc=0
|
||||||
../examples/examples-communication/http-client/player-url_subclass-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-http_post -> rc=0
|
||||||
../examples/examples-communication/http-client/streams-url_aac-audiokit -> rc=0
|
../examples/examples-communication/http-client/streams-url_aac-audiokit -> rc=0
|
||||||
../examples/examples-communication/http-client/streams-url_aac-i2s -> 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_mp3 -> rc=0
|
||||||
../examples/examples-communication/http-server/streams-audiokit-webserver_wav -> 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-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-webserver_aac -> rc=0
|
||||||
../examples/examples-communication/http-server/streams-generator-webserverex_wav -> rc=0
|
../examples/examples-communication/http-server/streams-generator-webserverex_wav -> rc=0
|
||||||
../examples/examples-communication/http-server/streams-generator-webserverex_wav1 -> 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/examples-communication/http-server/streams-tts-webserver_wav -> rc=0
|
||||||
../examples/tests/adc/read-csv -> rc=0
|
../examples/tests/adc/read-csv -> rc=0
|
||||||
../examples/tests/adc/read-csv_unsigned -> 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/adc/read-speed -> rc=0
|
||||||
../examples/tests/basic/24bits-write -> rc=0
|
../examples/tests/basic/24bits-write -> rc=0
|
||||||
../examples/tests/basic/test-allocator -> 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-memory-helix -> rc=0
|
||||||
../examples/tests/codecs/test-mp3-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-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/NBuffer -> rc=0
|
||||||
../examples/tests/concurrency/synchBufferRTOS -> rc=0
|
../examples/tests/concurrency/synchBufferRTOS -> rc=0
|
||||||
../examples/tests/concurrency/synchNBuffer -> rc=0
|
../examples/tests/concurrency/synchNBuffer -> rc=0
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
AnalogAudioStream analog_in;
|
AnalogAudioStream analog_in;
|
||||||
|
|
||||||
// Serial terminal output
|
// Serial terminal output
|
||||||
CsvStream<int16_t> serial_out(Serial);
|
CsvOutput<int16_t> serial_out(Serial);
|
||||||
|
|
||||||
#define BAUD_RATE 500000
|
#define BAUD_RATE 500000
|
||||||
#define SAMPLE_RATE 44100
|
#define SAMPLE_RATE 44100
|
||||||
|
@ -43,7 +43,7 @@ void setup() {
|
|||||||
|
|
||||||
void updateControl() {}
|
void updateControl() {}
|
||||||
|
|
||||||
mozzi_ns::AudioOutput updateAudio() {
|
AudioOutputMozzi updateAudio() {
|
||||||
int asig = mozzi.getAudioInput(); // range 0-1023
|
int asig = mozzi.getAudioInput(); // range 0-1023
|
||||||
asig = asig - 512; // now range is -512 to 511
|
asig = asig - 512; // now range is -512 to 511
|
||||||
// output range in STANDARD mode is -244 to 243,
|
// output range in STANDARD mode is -244 to 243,
|
||||||
|
@ -53,7 +53,7 @@ void updateControl() {
|
|||||||
gain = gain - 3;
|
gain = gain - 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozzi_ns::AudioOutput updateAudio() {
|
AudioOutputMozzi updateAudio() {
|
||||||
// shift back to STANDARD audio range, like /256 but faster
|
// shift back to STANDARD audio range, like /256 but faster
|
||||||
return (aSin.next() * gain) >> 8;
|
return (aSin.next() * gain) >> 8;
|
||||||
}
|
}
|
||||||
|
@ -46,7 +46,7 @@ void updateControl() {
|
|||||||
gain = gain - 3;
|
gain = gain - 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
mozzi_ns::AudioOutput updateAudio() {
|
AudioOutputMozzi updateAudio() {
|
||||||
return (aSin.next() * gain) >>
|
return (aSin.next() * gain) >>
|
||||||
8; // shift back to STANDARD audio range, like /256 but faster
|
8; // shift back to STANDARD audio range, like /256 but faster
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ void setup(void) {
|
|||||||
while(!Serial);
|
while(!Serial);
|
||||||
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
|
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
|
||||||
|
|
||||||
// start Volume Output
|
// start Volume Meter
|
||||||
out.begin(info);
|
out.begin(info);
|
||||||
|
|
||||||
// Setup sine wave
|
// Setup sine wave
|
||||||
|
@ -9,7 +9,7 @@ MemoryStream toneG8(g8_sine_raw, g8_sine_raw_len);
|
|||||||
// playback at 24000 (4 times slower)
|
// playback at 24000 (4 times slower)
|
||||||
const AudioInfo info(24000,1,16);
|
const AudioInfo info(24000,1,16);
|
||||||
AudioBoardStream i2s(AudioKitEs8388V1);
|
AudioBoardStream i2s(AudioKitEs8388V1);
|
||||||
CsvStream<int16_t> csv(Serial, 1);
|
CsvOutput<int16_t> csv(Serial, 1);
|
||||||
//FilteredStream<int16_t, int16_t> filter(i2s, 1);
|
//FilteredStream<int16_t, int16_t> filter(i2s, 1);
|
||||||
ResampleStream resample(csv); // replace with i2s
|
ResampleStream resample(csv); // replace with i2s
|
||||||
StreamCopy copier(resample, toneG8, 2048); // copies sound to out
|
StreamCopy copier(resample, toneG8, 2048); // copies sound to out
|
||||||
|
@ -7,7 +7,7 @@ AudioInfo from(44100, 2, 32);
|
|||||||
AudioInfo to(44100, 2, 16);
|
AudioInfo to(44100, 2, 16);
|
||||||
SineWaveGenerator<int32_t> sineWave;
|
SineWaveGenerator<int32_t> sineWave;
|
||||||
GeneratedSoundStream<int32_t> in(sineWave);
|
GeneratedSoundStream<int32_t> in(sineWave);
|
||||||
CsvStream<int16_t> out;
|
CsvOutput<int16_t> out;
|
||||||
FilteredStream<int16_t, float> filtered(out, from.channels);
|
FilteredStream<int16_t, float> filtered(out, from.channels);
|
||||||
NumberFormatConverterStream conv (filtered);
|
NumberFormatConverterStream conv (filtered);
|
||||||
StreamCopy copier(conv, in);
|
StreamCopy copier(conv, in);
|
||||||
|
@ -184,11 +184,6 @@ class StreamingDecoder : public AudioInfoSource {
|
|||||||
/// the loop
|
/// the loop
|
||||||
void setInput(Stream &inStream) { this->p_input = &inStream; }
|
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
|
/// Provides the last available MP3FrameInfo
|
||||||
virtual AudioInfo audioInfo() = 0;
|
virtual AudioInfo audioInfo() = 0;
|
||||||
|
|
||||||
|
@ -2,12 +2,13 @@
|
|||||||
|
|
||||||
#include "AudioTools.h"
|
#include "AudioTools.h"
|
||||||
|
|
||||||
namespace mozzi_ns {
|
// prevent naming conflict with audiotools
|
||||||
|
#define AudioOutput AudioOutputMozzi
|
||||||
#include <Mozzi.h>
|
#include <Mozzi.h>
|
||||||
}
|
#undef AudioOutput
|
||||||
|
|
||||||
void updateControl();
|
void updateControl();
|
||||||
mozzi_ns::AudioOutput updateAudio();
|
AudioOutputMozzi updateAudio();
|
||||||
|
|
||||||
namespace audio_tools {
|
namespace audio_tools {
|
||||||
|
|
||||||
|
@ -599,6 +599,8 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using RTSPStream = RTSPOutput;
|
using RTSPStream = RTSPOutput;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace audio_tools
|
} // namespace audio_tools
|
||||||
|
@ -109,6 +109,8 @@ class MetaDataOutput : public AudioOutput {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using MetaDataPrint = MetaDataOutput;
|
using MetaDataPrint = MetaDataOutput;
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
@ -89,7 +89,9 @@ class PWMAudioOutput : public AudioOutput {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using PWMAudioStream = PWMAudioOutput;
|
using PWMAudioStream = PWMAudioOutput;
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace audio_tools
|
} // namespace audio_tools
|
||||||
|
|
||||||
|
@ -228,7 +228,9 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
template <typename T> using CsvStream = CsvOutput<T>;
|
template <typename T> using CsvStream = CsvOutput<T>;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Creates a Hex Dump
|
* @brief Creates a Hex Dump
|
||||||
@ -292,7 +294,9 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using HexDumpStream = HexDumpOutput;
|
using HexDumpStream = HexDumpOutput;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Mixing of multiple outputs to one final output
|
* @brief Mixing of multiple outputs to one final output
|
||||||
@ -602,7 +606,9 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// legacy name
|
// legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using MemoryPrint = MemoryOutput;
|
using MemoryPrint = MemoryOutput;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Simple functionality to extract mono streams from a multichannel (e.g.
|
* @brief Simple functionality to extract mono streams from a multichannel (e.g.
|
||||||
|
@ -144,10 +144,11 @@ class AudioInfoSupport {
|
|||||||
virtual AudioInfo audioInfoOut() { return audioInfo();}
|
virtual AudioInfo audioInfoOut() { return audioInfo();}
|
||||||
};
|
};
|
||||||
// Support legacy name
|
// Support legacy name
|
||||||
|
#if USE_OBSOLETE
|
||||||
using AudioBaseInfo = AudioInfo;
|
using AudioBaseInfo = AudioInfo;
|
||||||
using AudioBaseInfoDependent = AudioInfoSupport;
|
using AudioBaseInfoDependent = AudioInfoSupport;
|
||||||
using AudioInfoDependent = AudioInfoSupport;
|
using AudioInfoDependent = AudioInfoSupport;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Supports the subscription to audio change notifications
|
* @brief Supports the subscription to audio change notifications
|
||||||
@ -173,13 +174,6 @@ class AudioInfoSource {
|
|||||||
notify_vector.clear();
|
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)
|
/// Deactivate/Reactivate automatic AudioInfo updates: (default is active)
|
||||||
void setNotifyActive(bool flag){
|
void setNotifyActive(bool flag){
|
||||||
is_notify_active = flag;
|
is_notify_active = flag;
|
||||||
|
@ -389,9 +389,11 @@ class QueueStream : public BaseStream {
|
|||||||
bool owns_buffer;
|
bool owns_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if USE_OBSOLETE
|
||||||
// support legacy name
|
// support legacy name
|
||||||
template <typename T>
|
template <typename T>
|
||||||
using CallbackBufferedStream = QueueStream<T>;
|
using CallbackBufferedStream = QueueStream<T>;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SWIG
|
#ifndef SWIG
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ using namespace audio_tools;
|
|||||||
|
|
||||||
MemoryStream aac(gs_16b_2c_44100hz_aac, gs_16b_2c_44100hz_aac_len);
|
MemoryStream aac(gs_16b_2c_44100hz_aac, gs_16b_2c_44100hz_aac_len);
|
||||||
PortAudioStream out; // Output of sound on desktop
|
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
|
EncodedAudioStream dec(&out, new AACDecoderFAAD()); // aac data source
|
||||||
StreamCopy copier(dec, aac); // copy in to out
|
StreamCopy copier(dec, aac); // copy in to out
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with
|
|||||||
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
|
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
|
||||||
//I2SStream out;
|
//I2SStream out;
|
||||||
PortAudioStream 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 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
|
EncodedAudioStream encoder(&decoder, new ADPCMEncoder(AV_CODEC_ID_ADPCM_IMA_WAV)); // encode and write
|
||||||
StreamCopy copier(encoder, sound);
|
StreamCopy copier(encoder, sound);
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
using namespace audio_tools;
|
using namespace audio_tools;
|
||||||
|
|
||||||
MemoryStream mp3(sample_12s_mp3, sample_12s_mp3_len);
|
MemoryStream mp3(sample_12s_mp3, sample_12s_mp3_len);
|
||||||
MetaDataPrint out;
|
MetaDataOutput out;
|
||||||
StreamCopy copier(out, mp3); // copy in to out
|
StreamCopy copier(out, mp3); // copy in to out
|
||||||
bool title_printed = false;
|
bool title_printed = false;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ SineWaveGenerator<int16_t> sineWave( 32000); // subclass of SoundGenerator with
|
|||||||
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
|
GeneratedSoundStream<int16_t> sound( sineWave); // Stream generated from sine wave
|
||||||
//I2SStream out;
|
//I2SStream out;
|
||||||
PortAudioStream out;
|
PortAudioStream out;
|
||||||
//CsvStream<int16_t> out(Serial);
|
//CsvOutput<int16_t> out(Serial);
|
||||||
#if USE_ADPCM
|
#if USE_ADPCM
|
||||||
ADPCMDecoder adpcm_decoder(AV_CODEC_ID_ADPCM_IMA_WAV);
|
ADPCMDecoder adpcm_decoder(AV_CODEC_ID_ADPCM_IMA_WAV);
|
||||||
ADPCMEncoder adpcm_encoder(AV_CODEC_ID_ADPCM_IMA_WAV);
|
ADPCMEncoder adpcm_encoder(AV_CODEC_ID_ADPCM_IMA_WAV);
|
||||||
|
Loading…
Reference in New Issue
Block a user