#error "The Audio Library only works with Teensy 3.X. Teensy 2.0 is unsupported." | #error "The Audio Library only works with Teensy 3.X. Teensy 2.0 is unsupported." | ||||
#endif | #endif | ||||
#include "DMAChannel.h" | |||||
#include <core/DMAChannel.h> | |||||
#if !defined(DMACHANNEL_HAS_BEGIN) || !defined(DMACHANNEL_HAS_BOOLEAN_CTOR) | #if !defined(DMACHANNEL_HAS_BEGIN) || !defined(DMACHANNEL_HAS_BOOLEAN_CTOR) | ||||
#error "You need to update DMAChannel.h & DMAChannel.cpp" | #error "You need to update DMAChannel.h & DMAChannel.cpp" | ||||
#error "https://github.com/PaulStoffregen/cores/blob/master/teensy3/DMAChannel.h" | #error "https://github.com/PaulStoffregen/cores/blob/master/teensy3/DMAChannel.h" | ||||
#define AudioInterrupts() (NVIC_ENABLE_IRQ(IRQ_SOFTWARE)) | #define AudioInterrupts() (NVIC_ENABLE_IRQ(IRQ_SOFTWARE)) | ||||
// include all the library headers, so a sketch can use a single | // include all the library headers, so a sketch can use a single | ||||
// #include <Audio.h> to get the whole library | |||||
// #include <audio/Audio.h> to get the whole library | |||||
// | // | ||||
#include "analyze_fft256.h" | |||||
#include "analyze_fft1024.h" | |||||
#include "analyze_print.h" | |||||
#include "analyze_tonedetect.h" | |||||
#include "analyze_notefreq.h" | |||||
#include "analyze_peak.h" | |||||
#include "analyze_rms.h" | |||||
#include "async_input_spdif3.h" | |||||
#include "control_sgtl5000.h" | |||||
#include "control_wm8731.h" | |||||
#include "control_ak4558.h" | |||||
#include "control_cs4272.h" | |||||
#include "control_cs42448.h" | |||||
#include "control_tlv320aic3206.h" | |||||
#include "effect_bitcrusher.h" | |||||
#include "effect_chorus.h" | |||||
#include "effect_fade.h" | |||||
#include "effect_flange.h" | |||||
#include "effect_envelope.h" | |||||
#include "effect_multiply.h" | |||||
#include "effect_delay.h" | |||||
#include "effect_delay_ext.h" | |||||
#include "effect_midside.h" | |||||
#include "effect_reverb.h" | |||||
#include "effect_freeverb.h" | |||||
#include "effect_waveshaper.h" | |||||
#include "effect_granular.h" | |||||
#include "effect_combine.h" | |||||
#include "effect_rectifier.h" | |||||
#include "filter_biquad.h" | |||||
#include "filter_fir.h" | |||||
#include "filter_variable.h" | |||||
#include "filter_ladder.h" | |||||
#include "input_adc.h" | |||||
#include "input_adcs.h" | |||||
#include "input_i2s.h" | |||||
#include "input_i2s2.h" | |||||
#include "input_i2s_quad.h" | |||||
#include "input_i2s_hex.h" | |||||
#include "input_i2s_oct.h" | |||||
#include "input_tdm.h" | |||||
#include "input_tdm2.h" | |||||
#include "input_pdm.h" | |||||
#include "input_spdif3.h" | |||||
#include "mixer.h" | |||||
#include "output_dac.h" | |||||
#include "output_dacs.h" | |||||
#include "output_i2s.h" | |||||
#include "output_i2s2.h" | |||||
#include "output_i2s_quad.h" | |||||
#include "output_i2s_hex.h" | |||||
#include "output_i2s_oct.h" | |||||
#include "output_mqs.h" | |||||
#include "output_pwm.h" | |||||
#include "output_spdif.h" | |||||
#include "output_spdif2.h" | |||||
#include "output_spdif3.h" | |||||
#include "output_pt8211.h" | |||||
#include "output_pt8211_2.h" | |||||
#include "output_tdm.h" | |||||
#include "output_tdm2.h" | |||||
#include "output_adat.h" | |||||
#include "play_memory.h" | |||||
#include "play_queue.h" | |||||
#include "play_sd_raw.h" | |||||
#include "play_sd_wav.h" | |||||
#include "play_serialflash_raw.h" | |||||
#include "record_queue.h" | |||||
#include "synth_tonesweep.h" | |||||
#include "synth_sine.h" | |||||
#include "synth_waveform.h" | |||||
#include "synth_dc.h" | |||||
#include "synth_whitenoise.h" | |||||
#include "synth_pinknoise.h" | |||||
#include "synth_karplusstrong.h" | |||||
#include "synth_simple_drum.h" | |||||
#include "synth_pwm.h" | |||||
#include "synth_wavetable.h" | |||||
#include "./analyze_fft256.h" | |||||
#include "./analyze_fft1024.h" | |||||
#include "./analyze_print.h" | |||||
#include "./analyze_tonedetect.h" | |||||
#include "./analyze_notefreq.h" | |||||
#include "./analyze_peak.h" | |||||
#include "./analyze_rms.h" | |||||
#include "./async_input_spdif3.h" | |||||
#include "./control_sgtl5000.h" | |||||
#include "./control_wm8731.h" | |||||
#include "./control_ak4558.h" | |||||
#include "./control_cs4272.h" | |||||
#include "./control_cs42448.h" | |||||
#include "./control_tlv320aic3206.h" | |||||
#include "./effect_bitcrusher.h" | |||||
#include "./effect_chorus.h" | |||||
#include "./effect_fade.h" | |||||
#include "./effect_flange.h" | |||||
#include "./effect_envelope.h" | |||||
#include "./effect_multiply.h" | |||||
#include "./effect_delay.h" | |||||
#include "./effect_delay_ext.h" | |||||
#include "./effect_midside.h" | |||||
#include "./effect_reverb.h" | |||||
#include "./effect_freeverb.h" | |||||
#include "./effect_waveshaper.h" | |||||
#include "./effect_granular.h" | |||||
#include "./effect_combine.h" | |||||
#include "./effect_rectifier.h" | |||||
#include "./filter_biquad.h" | |||||
#include "./filter_fir.h" | |||||
#include "./filter_variable.h" | |||||
#include "./filter_ladder.h" | |||||
#include "./input_adc.h" | |||||
#include "./input_adcs.h" | |||||
#include "./input_i2s.h" | |||||
#include "./input_i2s2.h" | |||||
#include "./input_i2s_quad.h" | |||||
#include "./input_i2s_hex.h" | |||||
#include "./input_i2s_oct.h" | |||||
#include "./input_tdm.h" | |||||
#include "./input_tdm2.h" | |||||
#include "./input_pdm.h" | |||||
#include "./input_spdif3.h" | |||||
#include "./mixer.h" | |||||
#include "./output_dac.h" | |||||
#include "./output_dacs.h" | |||||
#include "./output_i2s.h" | |||||
#include "./output_i2s2.h" | |||||
#include "./output_i2s_quad.h" | |||||
#include "./output_i2s_hex.h" | |||||
#include "./output_i2s_oct.h" | |||||
#include "./output_mqs.h" | |||||
#include "./output_pwm.h" | |||||
#include "./output_spdif.h" | |||||
#include "./output_spdif2.h" | |||||
#include "./output_spdif3.h" | |||||
#include "./output_pt8211.h" | |||||
#include "./output_pt8211_2.h" | |||||
#include "./output_tdm.h" | |||||
#include "./output_tdm2.h" | |||||
#include "./output_adat.h" | |||||
#include "./play_memory.h" | |||||
#include "./play_queue.h" | |||||
#include "./play_sd_raw.h" | |||||
#include "./play_sd_wav.h" | |||||
#include "./play_serialflash_raw.h" | |||||
#include "./record_queue.h" | |||||
#include "./synth_tonesweep.h" | |||||
#include "./synth_sine.h" | |||||
#include "./synth_waveform.h" | |||||
#include "./synth_dc.h" | |||||
#include "./synth_whitenoise.h" | |||||
#include "./synth_pinknoise.h" | |||||
#include "./synth_karplusstrong.h" | |||||
#include "./synth_simple_drum.h" | |||||
#include "./synth_pwm.h" | |||||
#include "./synth_wavetable.h" | |||||
#endif | #endif |
#ifndef quantizer_h_ | #ifndef quantizer_h_ | ||||
#define quantizer_h_ | #define quantizer_h_ | ||||
#include "Arduino.h" | |||||
#include <core/Arduino.h> | |||||
//#define DEBUG_QUANTIZER | //#define DEBUG_QUANTIZER | ||||
#define resampler_h_ | #define resampler_h_ | ||||
#include "Arduino.h" | |||||
#include <core/Arduino.h> | |||||
//#define DEBUG_RESAMPLER //activates debug output | //#define DEBUG_RESAMPLER //activates debug output | ||||
#define MAX_FILTER_SAMPLES 40961 //=1024*20 +1 | #define MAX_FILTER_SAMPLES 40961 //=1024*20 +1 |
#ifndef analyze_fft1024_h_ | #ifndef analyze_fft1024_h_ | ||||
#define analyze_fft1024_h_ | #define analyze_fft1024_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
// windows.c | // windows.c | ||||
extern "C" { | extern "C" { |
#ifndef analyze_fft256_h_ | #ifndef analyze_fft256_h_ | ||||
#define analyze_fft256_h_ | #define analyze_fft256_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
// windows.c | // windows.c | ||||
extern "C" { | extern "C" { |
#ifndef AudioAnalyzeNoteFrequency_h_ | #ifndef AudioAnalyzeNoteFrequency_h_ | ||||
#define AudioAnalyzeNoteFrequency_h_ | #define AudioAnalyzeNoteFrequency_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
/*********************************************************************** | /*********************************************************************** | ||||
* Safe to adjust these values below * | * Safe to adjust these values below * | ||||
* * | * * |
#ifndef analyze_peakdetect_h_ | #ifndef analyze_peakdetect_h_ | ||||
#define analyze_peakdetect_h_ | #define analyze_peakdetect_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioAnalyzePeak : public AudioStream | class AudioAnalyzePeak : public AudioStream | ||||
{ | { |
#ifndef analyze_print_h_ | #ifndef analyze_print_h_ | ||||
#define analyze_print_h_ | #define analyze_print_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioAnalyzePrint : public AudioStream | class AudioAnalyzePrint : public AudioStream | ||||
{ | { |
#ifndef analyze_rms_h_ | #ifndef analyze_rms_h_ | ||||
#define analyze_rms_h_ | #define analyze_rms_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioAnalyzeRMS : public AudioStream | class AudioAnalyzeRMS : public AudioStream | ||||
{ | { |
#ifndef analyze_tonedetect_h_ | #ifndef analyze_tonedetect_h_ | ||||
#define analyze_tonedetect_h_ | #define analyze_tonedetect_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioAnalyzeToneDetect : public AudioStream | class AudioAnalyzeToneDetect : public AudioStream | ||||
{ | { |
*/ | */ | ||||
#ifndef async_input_spdif3_h_ | #ifndef async_input_spdif3_h_ | ||||
#define async_input_spdif3_h_ | #define async_input_spdif3_h_ | ||||
#include "Resampler.h" | |||||
#include "Quantizer.h" | |||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <arm_math.h> | |||||
#include "./Resampler.h" | |||||
#include "./Quantizer.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
#include <core/arm_math.h> | |||||
//#define DEBUG_SPDIF_IN //activates debug output | //#define DEBUG_SPDIF_IN //activates debug output | ||||
#ifndef biquad_coeffs_h_ | #ifndef biquad_coeffs_h_ | ||||
#define biquad_coeffs_h_ | #define biquad_coeffs_h_ | ||||
#include "Arduino.h" | |||||
#include <arm_math.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/arm_math.h> | |||||
#include <type_traits> | #include <type_traits> | ||||
enum class BiquadType { | enum class BiquadType { |
#ifndef control_ak4558_h_ | #ifndef control_ak4558_h_ | ||||
#define control_ak4558_h_ | #define control_ak4558_h_ | ||||
#include "AudioControl.h" | |||||
#include "./AudioControl.h" | |||||
#define AK4558_SERIAL_DEBUG 1 | #define AK4558_SERIAL_DEBUG 1 | ||||
//if 1, then Serial Monitor will show debug information about configuration of the AK4558 | //if 1, then Serial Monitor will show debug information about configuration of the AK4558 |
#ifndef control_cs42448_h_ | #ifndef control_cs42448_h_ | ||||
#define control_cs42448_h_ | #define control_cs42448_h_ | ||||
#include "AudioControl.h" | |||||
#include "./AudioControl.h" | |||||
#include <math.h> | #include <math.h> | ||||
class AudioControlCS42448 : public AudioControl | class AudioControlCS42448 : public AudioControl |
#ifndef control_cs4272_h_ | #ifndef control_cs4272_h_ | ||||
#define control_cs4272_h_ | #define control_cs4272_h_ | ||||
#include "AudioControl.h" | |||||
#include "./AudioControl.h" | |||||
class AudioControlCS4272 : public AudioControl | class AudioControlCS4272 : public AudioControl | ||||
{ | { |
#ifndef control_sgtl5000_h_ | #ifndef control_sgtl5000_h_ | ||||
#define control_sgtl5000_h_ | #define control_sgtl5000_h_ | ||||
#include <AudioStream.h> | |||||
#include "AudioControl.h" | |||||
#include <core/AudioStream.h> | |||||
#include "./AudioControl.h" | |||||
// SGTL5000-specific defines for headphones | // SGTL5000-specific defines for headphones | ||||
#define AUDIO_HEADPHONE_DAC 0 | #define AUDIO_HEADPHONE_DAC 0 |
#ifndef control_tlv320aic3206_h_ | #ifndef control_tlv320aic3206_h_ | ||||
#define control_tlv320aic3206_h_ | #define control_tlv320aic3206_h_ | ||||
#include "AudioControl.h" | |||||
#include <Arduino.h> | |||||
#include "./AudioControl.h" | |||||
#include <core/Arduino.h> | |||||
//convenience names to use with inputSelect() to set whnch analog inputs to use | //convenience names to use with inputSelect() to set whnch analog inputs to use | ||||
#define AIC3206_INPUT_IN1 1 //uses IN1 | #define AIC3206_INPUT_IN1 1 //uses IN1 |
#ifndef control_wm8731_h_ | #ifndef control_wm8731_h_ | ||||
#define control_wm8731_h_ | #define control_wm8731_h_ | ||||
#include "AudioControl.h" | |||||
#include "./AudioControl.h" | |||||
class AudioControlWM8731 : public AudioControl | class AudioControlWM8731 : public AudioControl | ||||
{ | { |
#ifndef effect_bitcrusher_h_ | #ifndef effect_bitcrusher_h_ | ||||
#define effect_bitcrusher_h_ | #define effect_bitcrusher_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectBitcrusher : public AudioStream | class AudioEffectBitcrusher : public AudioStream | ||||
{ | { |
#ifndef effect_chorus_h_ | #ifndef effect_chorus_h_ | ||||
#define effect_chorus_h_ | #define effect_chorus_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
/******************************************************************/ | /******************************************************************/ | ||||
#ifndef effect_digital_combine_h_ | #ifndef effect_digital_combine_h_ | ||||
#define effect_digital_combine_h_ | #define effect_digital_combine_h_ | ||||
#include <Arduino.h> | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectDigitalCombine : public AudioStream | class AudioEffectDigitalCombine : public AudioStream | ||||
{ | { |
#ifndef effect_delay_h_ | #ifndef effect_delay_h_ | ||||
#define effect_delay_h_ | #define effect_delay_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
#if defined(__IMXRT1062__) | #if defined(__IMXRT1062__) | ||||
// 4.00 second maximum on Teensy 4.0 | // 4.00 second maximum on Teensy 4.0 |
#ifndef effect_delay_ext_h_ | #ifndef effect_delay_ext_h_ | ||||
#define effect_delay_ext_h_ | #define effect_delay_ext_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "spi_interrupt.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./spi_interrupt.h" | |||||
enum AudioEffectDelayMemoryType_t { | enum AudioEffectDelayMemoryType_t { | ||||
AUDIO_MEMORY_23LC1024 = 0, // 128k x 8 S-RAM | AUDIO_MEMORY_23LC1024 = 0, // 128k x 8 S-RAM |
#ifndef effect_envelope_h_ | #ifndef effect_envelope_h_ | ||||
#define effect_envelope_h_ | #define effect_envelope_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
#define SAMPLES_PER_MSEC (AUDIO_SAMPLE_RATE_EXACT/1000.0) | #define SAMPLES_PER_MSEC (AUDIO_SAMPLE_RATE_EXACT/1000.0) | ||||
#ifndef effect_fade_h_ | #ifndef effect_fade_h_ | ||||
#define effect_fade_h_ | #define effect_fade_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectFade : public AudioStream | class AudioEffectFade : public AudioStream | ||||
{ | { |
#ifndef effect_flange_h_ | #ifndef effect_flange_h_ | ||||
#define effect_flange_h_ | #define effect_flange_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
/******************************************************************/ | /******************************************************************/ | ||||
// A u d i o E f f e c t F l a n g e | // A u d i o E f f e c t F l a n g e |
#ifndef effect_freeverb_h_ | #ifndef effect_freeverb_h_ | ||||
#define effect_freeverb_h_ | #define effect_freeverb_h_ | ||||
#include <Arduino.h> | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectFreeverb : public AudioStream | class AudioEffectFreeverb : public AudioStream | ||||
{ | { |
* SOFTWARE. | * SOFTWARE. | ||||
*/ | */ | ||||
#include "AudioStream.h" | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectGranular : public AudioStream | class AudioEffectGranular : public AudioStream | ||||
{ | { |
#ifndef effect_midside_decode_h_ | #ifndef effect_midside_decode_h_ | ||||
#define effect_midside_decode_h_ | #define effect_midside_decode_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "utility/dspinst.h" | |||||
#include "./utility/dspinst.h" | |||||
/** | /** |
#ifndef effect_multiply_h_ | #ifndef effect_multiply_h_ | ||||
#define effect_multiply_h_ | #define effect_multiply_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
class AudioEffectMultiply : public AudioStream | class AudioEffectMultiply : public AudioStream | ||||
{ | { |
#ifndef effect_rectifier_h_ | #ifndef effect_rectifier_h_ | ||||
#define effect_rectifier_h_ | #define effect_rectifier_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectRectifier: public AudioStream | class AudioEffectRectifier: public AudioStream | ||||
{ | { |
#ifndef effect_reverb_ | #ifndef effect_reverb_ | ||||
#define effect_reverb_ | #define effect_reverb_ | ||||
#include "AudioStream.h" | |||||
#include <core/AudioStream.h> | |||||
#define APF1_BUF_LEN 600 | #define APF1_BUF_LEN 600 | ||||
#define APF2_BUF_LEN 1300 | #define APF2_BUF_LEN 1300 |
#ifndef effect_waveshaper_h_ | #ifndef effect_waveshaper_h_ | ||||
#define effect_waveshaper_h_ | #define effect_waveshaper_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioEffectWaveshaper : public AudioStream | class AudioEffectWaveshaper : public AudioStream | ||||
{ | { |
#ifndef filter_biquad_h_ | #ifndef filter_biquad_h_ | ||||
#define filter_biquad_h_ | #define filter_biquad_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioFilterBiquad : public AudioStream | class AudioFilterBiquad : public AudioStream | ||||
{ | { |
#ifndef filter_fir_h_ | #ifndef filter_fir_h_ | ||||
#define filter_fir_h_ | #define filter_fir_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
// Indicates that the code should just pass through the audio | // Indicates that the code should just pass through the audio | ||||
// without any filtering (as opposed to doing nothing at all) | // without any filtering (as opposed to doing nothing at all) |
#ifndef filter_ladder_h_ | #ifndef filter_ladder_h_ | ||||
#define filter_ladder_h_ | #define filter_ladder_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioFilterLadder: public AudioStream | class AudioFilterLadder: public AudioStream | ||||
{ | { |
#ifndef filter_variable_h_ | #ifndef filter_variable_h_ | ||||
#define filter_variable_h_ | #define filter_variable_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioFilterStateVariable: public AudioStream | class AudioFilterStateVariable: public AudioStream | ||||
{ | { |
#ifndef input_adc_h_ | #ifndef input_adc_h_ | ||||
#define input_adc_h_ | #define input_adc_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputAnalog : public AudioStream | class AudioInputAnalog : public AudioStream | ||||
{ | { |
#ifndef input_adcs_h_ | #ifndef input_adcs_h_ | ||||
#define input_adcs_h_ | #define input_adcs_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputAnalogStereo : public AudioStream | class AudioInputAnalogStereo : public AudioStream | ||||
{ | { |
#ifndef _input_i2s_h_ | #ifndef _input_i2s_h_ | ||||
#define _input_i2s_h_ | #define _input_i2s_h_ | ||||
#include <Arduino.h> | |||||
#include <AudioStream.h> | |||||
#include <DMAChannel.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputI2S : public AudioStream | class AudioInputI2S : public AudioStream | ||||
{ | { |
#ifndef _input_i2s2_h_ | #ifndef _input_i2s2_h_ | ||||
#define _input_i2s2_h_ | #define _input_i2s2_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputI2S2 : public AudioStream | class AudioInputI2S2 : public AudioStream | ||||
{ | { |
#ifndef _input_i2s_hex_h_ | #ifndef _input_i2s_hex_h_ | ||||
#define _input_i2s_hex_h_ | #define _input_i2s_hex_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputI2SHex : public AudioStream | class AudioInputI2SHex : public AudioStream | ||||
{ | { |
#ifndef _input_i2s_oct_h_ | #ifndef _input_i2s_oct_h_ | ||||
#define _input_i2s_oct_h_ | #define _input_i2s_oct_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputI2SOct : public AudioStream | class AudioInputI2SOct : public AudioStream | ||||
{ | { |
#ifndef _input_i2s_quad_h_ | #ifndef _input_i2s_quad_h_ | ||||
#define _input_i2s_quad_h_ | #define _input_i2s_quad_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputI2SQuad : public AudioStream | class AudioInputI2SQuad : public AudioStream | ||||
{ | { |
#ifndef _input_pdm_h_ | #ifndef _input_pdm_h_ | ||||
#define _input_pdm_h_ | #define _input_pdm_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputPDM : public AudioStream | class AudioInputPDM : public AudioStream | ||||
{ | { |
#ifndef _input_spdif3_h_ | #ifndef _input_spdif3_h_ | ||||
#define _input_spdif3_h_ | #define _input_spdif3_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputSPDIF3 : public AudioStream | class AudioInputSPDIF3 : public AudioStream | ||||
{ | { |
#ifndef _input_tdm_h_ | #ifndef _input_tdm_h_ | ||||
#define _input_tdm_h_ | #define _input_tdm_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputTDM : public AudioStream | class AudioInputTDM : public AudioStream | ||||
{ | { |
#ifndef _input_tdm2_h_ | #ifndef _input_tdm2_h_ | ||||
#define _input_tdm2_h_ | #define _input_tdm2_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioInputTDM2 : public AudioStream | class AudioInputTDM2 : public AudioStream | ||||
{ | { |
#ifndef mixer_h_ | #ifndef mixer_h_ | ||||
#define mixer_h_ | #define mixer_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioMixer4 : public AudioStream | class AudioMixer4 : public AudioStream | ||||
{ | { |
#ifndef output_ADAT_h_ | #ifndef output_ADAT_h_ | ||||
#define output_ADAT_h_ | #define output_ADAT_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputADAT : public AudioStream | class AudioOutputADAT : public AudioStream | ||||
{ | { |
#ifndef output_dac_h_ | #ifndef output_dac_h_ | ||||
#define output_dac_h_ | #define output_dac_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputAnalog : public AudioStream | class AudioOutputAnalog : public AudioStream | ||||
{ | { |
#ifndef output_dacs_h_ | #ifndef output_dacs_h_ | ||||
#define output_dacs_h_ | #define output_dacs_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputAnalogStereo : public AudioStream | class AudioOutputAnalogStereo : public AudioStream | ||||
{ | { |
#ifndef output_i2s_h_ | #ifndef output_i2s_h_ | ||||
#define output_i2s_h_ | #define output_i2s_h_ | ||||
#include <Arduino.h> | |||||
#include <AudioStream.h> | |||||
#include <DMAChannel.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
#if !defined(KINETISL) | #if !defined(KINETISL) |
#ifndef output_i2s2_h_ | #ifndef output_i2s2_h_ | ||||
#define output_i2s2_h_ | #define output_i2s2_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputI2S2 : public AudioStream | class AudioOutputI2S2 : public AudioStream |
#ifndef output_i2s_hex_h_ | #ifndef output_i2s_hex_h_ | ||||
#define output_i2s_hex_h_ | #define output_i2s_hex_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputI2SHex : public AudioStream | class AudioOutputI2SHex : public AudioStream | ||||
{ | { |
#ifndef output_i2s_oct_h_ | #ifndef output_i2s_oct_h_ | ||||
#define output_i2s_oct_h_ | #define output_i2s_oct_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputI2SOct : public AudioStream | class AudioOutputI2SOct : public AudioStream | ||||
{ | { |
#ifndef output_i2s_quad_h_ | #ifndef output_i2s_quad_h_ | ||||
#define output_i2s_quad_h_ | #define output_i2s_quad_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputI2SQuad : public AudioStream | class AudioOutputI2SQuad : public AudioStream | ||||
{ | { |
#ifndef output_mqs_h_ | #ifndef output_mqs_h_ | ||||
#define output_mqs_h_ | #define output_mqs_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputMQS : public AudioStream | class AudioOutputMQS : public AudioStream | ||||
{ | { |
#ifndef output_pt8211_h_ | #ifndef output_pt8211_h_ | ||||
#define output_pt8211_h_ | #define output_pt8211_h_ | ||||
#include <Arduino.h> | |||||
#include <AudioStream.h> | |||||
#include <DMAChannel.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
#if !defined(KINETISL) | #if !defined(KINETISL) |
// #define AUDIO_PT8211_INTERPOLATION_LINEAR | // #define AUDIO_PT8211_INTERPOLATION_LINEAR | ||||
#define AUDIO_PT8211_INTERPOLATION_CIC | #define AUDIO_PT8211_INTERPOLATION_CIC | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputPT8211_2 : public AudioStream | class AudioOutputPT8211_2 : public AudioStream | ||||
{ | { |
#ifndef output_pwm_h_ | #ifndef output_pwm_h_ | ||||
#define output_pwm_h_ | #define output_pwm_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
#if defined(__IMXRT1062__) | #if defined(__IMXRT1062__) | ||||
struct _pwm_pin_info_struct { | struct _pwm_pin_info_struct { |
#ifndef output_SPDIF_h_ | #ifndef output_SPDIF_h_ | ||||
#define output_SPDIF_h_ | #define output_SPDIF_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputSPDIF : public AudioStream | class AudioOutputSPDIF : public AudioStream | ||||
{ | { |
#ifndef output_SPDIF2_h_ | #ifndef output_SPDIF2_h_ | ||||
#define output_SPDIF2_h_ | #define output_SPDIF2_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputSPDIF2 : public AudioStream | class AudioOutputSPDIF2 : public AudioStream | ||||
{ | { |
#ifndef output_SPDIF3_h_ | #ifndef output_SPDIF3_h_ | ||||
#define output_SPDIF3_h_ | #define output_SPDIF3_h_ | ||||
#include <Arduino.h> | |||||
#include <AudioStream.h> | |||||
#include <DMAChannel.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputSPDIF3 : public AudioStream | class AudioOutputSPDIF3 : public AudioStream | ||||
{ | { |
#ifndef output_tdm_h_ | #ifndef output_tdm_h_ | ||||
#define output_tdm_h_ | #define output_tdm_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputTDM : public AudioStream | class AudioOutputTDM : public AudioStream | ||||
{ | { |
#ifndef output_tdm2_h_ | #ifndef output_tdm2_h_ | ||||
#define output_tdm2_h_ | #define output_tdm2_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "DMAChannel.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/DMAChannel.h> | |||||
class AudioOutputTDM2 : public AudioStream | class AudioOutputTDM2 : public AudioStream | ||||
{ | { |
#ifndef play_memory_h_ | #ifndef play_memory_h_ | ||||
#define play_memory_h_ | #define play_memory_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioPlayMemory : public AudioStream | class AudioPlayMemory : public AudioStream | ||||
{ | { |
#ifndef play_queue_h_ | #ifndef play_queue_h_ | ||||
#define play_queue_h_ | #define play_queue_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioPlayQueue : public AudioStream | class AudioPlayQueue : public AudioStream | ||||
{ | { |
#ifndef play_sd_raw_h_ | #ifndef play_sd_raw_h_ | ||||
#define play_sd_raw_h_ | #define play_sd_raw_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "SD.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <sd/SD.h> | |||||
class AudioPlaySdRaw : public AudioStream | class AudioPlaySdRaw : public AudioStream | ||||
{ | { |
#ifndef play_sd_wav_h_ | #ifndef play_sd_wav_h_ | ||||
#define play_sd_wav_h_ | #define play_sd_wav_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "SD.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <sd/SD.h> | |||||
class AudioPlaySdWav : public AudioStream | class AudioPlaySdWav : public AudioStream | ||||
{ | { |
#ifndef play_serial_raw_h_ | #ifndef play_serial_raw_h_ | ||||
#define play_serial_raw_h_ | #define play_serial_raw_h_ | ||||
#include "Arduino.h" | |||||
#include <AudioStream.h> | |||||
#include <SerialFlash.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <serial-flash/SerialFlash.h> | |||||
class AudioPlaySerialflashRaw : public AudioStream | class AudioPlaySerialflashRaw : public AudioStream | ||||
{ | { |
#ifndef record_queue_h_ | #ifndef record_queue_h_ | ||||
#define record_queue_h_ | #define record_queue_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
class AudioRecordQueue : public AudioStream | class AudioRecordQueue : public AudioStream | ||||
{ | { |
#ifndef audio_spi_interrupt_h_ | #ifndef audio_spi_interrupt_h_ | ||||
#define audio_spi_interrupt_h_ | #define audio_spi_interrupt_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "SPI.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <spi/SPI.h> | |||||
static inline void AudioStartUsingSPI(void) __attribute__((always_inline, unused)); | static inline void AudioStartUsingSPI(void) __attribute__((always_inline, unused)); | ||||
static inline void AudioStopUsingSPI(void) __attribute__((always_inline, unused)); | static inline void AudioStopUsingSPI(void) __attribute__((always_inline, unused)); |
#ifndef synth_dc_h_ | #ifndef synth_dc_h_ | ||||
#define synth_dc_h_ | #define synth_dc_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
// compute (a - b) / c | // compute (a - b) / c | ||||
// handling 32 bit interger overflow at every step | // handling 32 bit interger overflow at every step |
#ifndef synth_karplusstrong_h_ | #ifndef synth_karplusstrong_h_ | ||||
#define synth_karplusstrong_h_ | #define synth_karplusstrong_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
class AudioSynthKarplusStrong : public AudioStream | class AudioSynthKarplusStrong : public AudioStream | ||||
{ | { |
#ifndef synth_pinknoise_h_ | #ifndef synth_pinknoise_h_ | ||||
#define synth_pinknoise_h_ | #define synth_pinknoise_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
class AudioSynthNoisePink : public AudioStream | class AudioSynthNoisePink : public AudioStream | ||||
{ | { |
#ifndef synth_pwm_h_ | #ifndef synth_pwm_h_ | ||||
#define synth_pwm_h_ | #define synth_pwm_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
class AudioSynthWaveformPWM : public AudioStream | class AudioSynthWaveformPWM : public AudioStream | ||||
{ | { |
#ifndef _SYNTH_SIMPLE_DRUM_H_ | #ifndef _SYNTH_SIMPLE_DRUM_H_ | ||||
#define _SYNTH_SIMPLE_DRUM_H_ | #define _SYNTH_SIMPLE_DRUM_H_ | ||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
class AudioSynthSimpleDrum : public AudioStream | class AudioSynthSimpleDrum : public AudioStream | ||||
{ | { |
#ifndef synth_sine_h_ | #ifndef synth_sine_h_ | ||||
#define synth_sine_h_ | #define synth_sine_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
// TODO: investigate making a high resolution sine wave | // TODO: investigate making a high resolution sine wave | ||||
// using Taylor series expansion. | // using Taylor series expansion. |
#ifndef synth_tonesweep_h_ | #ifndef synth_tonesweep_h_ | ||||
#define synth_tonesweep_h_ | #define synth_tonesweep_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
// A u d i o S y n t h T o n e S w e e p | // A u d i o S y n t h T o n e S w e e p | ||||
// Written by Pete (El Supremo) Feb 2014 | // Written by Pete (El Supremo) Feb 2014 |
#ifndef synth_waveform_h_ | #ifndef synth_waveform_h_ | ||||
#define synth_waveform_h_ | #define synth_waveform_h_ | ||||
#include <Arduino.h> | |||||
#include "AudioStream.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <core/arm_math.h> | |||||
// waveforms.c | // waveforms.c | ||||
extern "C" { | extern "C" { |
#pragma once | #pragma once | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include <math.h> | #include <math.h> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
#ifndef synth_whitenoise_h_ | #ifndef synth_whitenoise_h_ | ||||
#define synth_whitenoise_h_ | #define synth_whitenoise_h_ | ||||
#include "Arduino.h" | |||||
#include "AudioStream.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include <core/AudioStream.h> | |||||
#include "./utility/dspinst.h" | |||||
class AudioSynthNoiseWhite : public AudioStream | class AudioSynthNoiseWhite : public AudioStream | ||||
{ | { |
#define IMXRT_CACHE_ENABLED 2 // 0=disabled, 1=WT, 2= WB | #define IMXRT_CACHE_ENABLED 2 // 0=disabled, 1=WT, 2= WB | ||||
#include <Arduino.h> | |||||
#include <imxrt.h> | |||||
#include <core/Arduino.h> | |||||
#include <core/imxrt.h> | |||||
void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force = false); // sets PLL4 | void set_audioClock(int nfact, int32_t nmult, uint32_t ndiv, bool force = false); // sets PLL4 | ||||
/* | /* | ||||
by Alexander Walch | by Alexander Walch | ||||
*/ | */ | ||||
#include "Quantizer.h" | |||||
#include "audio/Quantizer.h" | |||||
#define SAMPLEINVALID(sample) (!isfinite(sample) || abs(sample) >= 1.2) //use only for floating point samples (\in [-1.,1.]) | #define SAMPLEINVALID(sample) (!isfinite(sample) || abs(sample) >= 1.2) //use only for floating point samples (\in [-1.,1.]) | ||||
by Alexander Walch | by Alexander Walch | ||||
*/ | */ | ||||
#include "Resampler.h" | |||||
#include "audio/Resampler.h" | |||||
#include <math.h> | #include <math.h> | ||||
Resampler::Resampler(float attenuation, int32_t minHalfFilterLength, int32_t maxHalfFilterLength, StepAdaptionParameters settings): _targetAttenuation(attenuation) | Resampler::Resampler(float attenuation, int32_t minHalfFilterLength, int32_t maxHalfFilterLength, StepAdaptionParameters settings): _targetAttenuation(attenuation) |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_fft1024.h" | |||||
#include "sqrt_integer.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_fft1024.h" | |||||
#include "audio/utility/sqrt_integer.h" | |||||
#include "audio/utility/dspinst.h" | |||||
// 140312 - PAH - slightly faster copy | // 140312 - PAH - slightly faster copy |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_fft256.h" | |||||
#include "sqrt_integer.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_fft256.h" | |||||
#include "audio/utility/sqrt_integer.h" | |||||
#include "audio/utility/dspinst.h" | |||||
// 140312 - PAH - slightly faster copy | // 140312 - PAH - slightly faster copy |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_notefreq.h" | |||||
#include "utility/dspinst.h" | |||||
#include "arm_math.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_notefreq.h" | |||||
#include "audio/utility/dspinst.h" | |||||
#include <core/arm_math.h> | |||||
#define HALF_BLOCKS AUDIO_GUITARTUNER_BLOCKS * 64 | #define HALF_BLOCKS AUDIO_GUITARTUNER_BLOCKS * 64 | ||||
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_peak.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_peak.h" | |||||
void AudioAnalyzePeak::update(void) | void AudioAnalyzePeak::update(void) | ||||
{ | { |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_print.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_print.h" | |||||
#define STATE_IDLE 0 // doing nothing | #define STATE_IDLE 0 // doing nothing | ||||
#define STATE_WAIT_TRIGGER 1 // looking for trigger condition | #define STATE_WAIT_TRIGGER 1 // looking for trigger condition |
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_rms.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_rms.h" | |||||
#include "audio/utility/dspinst.h" | |||||
void AudioAnalyzeRMS::update(void) | void AudioAnalyzeRMS::update(void) | ||||
{ | { |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "analyze_tonedetect.h" | |||||
#include "utility/dspinst.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/analyze_tonedetect.h" | |||||
#include "audio/utility/dspinst.h" | |||||
#if defined(__ARM_ARCH_7EM__) | #if defined(__ARM_ARCH_7EM__) | ||||
*/ | */ | ||||
#if defined(__IMXRT1052__) || defined(__IMXRT1062__) | #if defined(__IMXRT1052__) || defined(__IMXRT1062__) | ||||
#include "async_input_spdif3.h" | |||||
#include "output_spdif3.h" | |||||
#include "audio/async_input_spdif3.h" | |||||
#include "audio/output_spdif3.h" | |||||
#include "biquad.h" | |||||
#include <utility/imxrt_hw.h> | |||||
#include "audio/biquad.h" | |||||
#include "audio/utility/imxrt_hw.h" | |||||
//Parameters | //Parameters | ||||
namespace { | namespace { | ||||
#define SPDIF_RX_BUFFER_LENGTH AUDIO_BLOCK_SAMPLES | #define SPDIF_RX_BUFFER_LENGTH AUDIO_BLOCK_SAMPLES |
* Copyright 2015, Michele Perla | * Copyright 2015, Michele Perla | ||||
* | * | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "control_ak4558.h" | |||||
#include "Wire.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/control_ak4558.h" | |||||
#include "wire/Wire.h" | |||||
void AudioControlAK4558::initConfig(void) | void AudioControlAK4558::initConfig(void) | ||||
{ | { |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "control_cs42448.h" | |||||
#include "Wire.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/control_cs42448.h" | |||||
#include <wire/Wire.h> | |||||
#define CS42448_Chip_ID 0x01 | #define CS42448_Chip_ID 0x01 |
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "control_cs4272.h" | |||||
#include "Wire.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/control_cs4272.h" | |||||
#include "wire/Wire.h" | |||||
#define CS4272_ADDR 0x10 // TODO: need to double check | #define CS4272_ADDR 0x10 // TODO: need to double check | ||||
* THE SOFTWARE. | * THE SOFTWARE. | ||||
*/ | */ | ||||
#include <Arduino.h> | |||||
#include "control_sgtl5000.h" | |||||
#include "Wire.h" | |||||
#include <core/Arduino.h> | |||||
#include "audio/control_sgtl5000.h" | |||||
#include "wire/Wire.h" | |||||
#define CHIP_ID 0x0000 | #define CHIP_ID 0x0000 | ||||
// 15:8 PARTID 0xA0 - 8 bit identifier for SGTL5000 | // 15:8 PARTID 0xA0 - 8 bit identifier for SGTL5000 |
License: MIT License. Use at your own risk. | License: MIT License. Use at your own risk. | ||||
*/ | */ | ||||
#include "control_tlv320aic3206.h" | |||||
#include <Wire.h> | |||||
#include "audio/control_tlv320aic3206.h" | |||||
#include <wire/Wire.h> | |||||
//******************************** Constants *******************************// | //******************************** Constants *******************************// | ||||