@@ -1,9 +1,7 @@ | |||
#include "Audio.h" | |||
#include "analyze_fft256.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
// TODO: this should be a class member, so more than one FFT can be used | |||
static arm_cfft_radix4_instance_q15 fft_inst; | |||
void AudioAnalyzeFFT256::init(void) |
@@ -2,7 +2,6 @@ | |||
#define analyze_fft256_h_ | |||
#include "AudioStream.h" | |||
#include "arm_math.h" | |||
// windows.c | |||
extern "C" { |
@@ -1,11 +1,9 @@ | |||
#include "Audio.h" | |||
#include "analyze_print.h" | |||
// TODO: this needs some sort of trigger or delay or other options to make | |||
// actually useful for watching interesting parts of data, without spewing | |||
// tremendous and endless data to the Arduino Serial Monitor | |||
void AudioPrint::update(void) | |||
{ | |||
audio_block_t *block; |
@@ -1,9 +1,6 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "analyze_tonedetect.h" | |||
#include "utility/dspinst.h" | |||
static inline int32_t multiply_32x32_rshift30(int32_t a, int32_t b) __attribute__((always_inline)); | |||
static inline int32_t multiply_32x32_rshift30(int32_t a, int32_t b) | |||
{ |
@@ -1,7 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "control_sgtl5000.h" | |||
#include "Wire.h" | |||
#define CHIP_ID 0x0000 |
@@ -1,7 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "control_wm8731.h" | |||
#include "Wire.h" | |||
#define WM8731_I2C_ADDR 0x1A |
@@ -1,7 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
#include "effect_chorus.h" | |||
/******************************************************************/ | |||
@@ -1,14 +1,10 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "effect_fade.h" | |||
#include "utility/dspinst.h" | |||
extern "C" { | |||
extern const int16_t fader_table[256]; | |||
}; | |||
void AudioEffectFade::update(void) | |||
{ | |||
audio_block_t *block; |
@@ -1,9 +1,5 @@ | |||
#include "Audio.h" | |||
#include "effect_flange.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
/******************************************************************/ | |||
// A u d i o E f f e c t F l a n g e |
@@ -1,8 +1,6 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "filter_biquad.h" | |||
#include "utility/dspinst.h" | |||
void AudioFilterBiquad::update(void) | |||
{ | |||
audio_block_t *block; |
@@ -1,8 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
#include "filter_fir.h" | |||
void AudioFilterFIR::begin(short *cp,int n_coeffs) | |||
{ |
@@ -2,6 +2,7 @@ | |||
#define filter_fir_h_ | |||
#include "AudioStream.h" | |||
#include "arm_math.h" | |||
// Maximum number of coefficients in a FIR filter | |||
// The audio breaks up with 128 coefficients so a |
@@ -1,7 +1,6 @@ | |||
#include "Audio.h" | |||
#include "input_adc.h" | |||
#include "utility/pdb.h" | |||
DMAMEM static uint16_t analog_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||
audio_block_t * AudioInputAnalog::block_left = NULL; | |||
uint16_t AudioInputAnalog::block_offset = 0; |
@@ -1,6 +1,5 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "input_i2s.h" | |||
#include "output_i2s.h" | |||
DMAMEM static uint32_t i2s_rx_buffer[AUDIO_BLOCK_SAMPLES]; | |||
audio_block_t * AudioInputI2S::block_left = NULL; |
@@ -1,9 +1,6 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "mixer.h" | |||
#include "utility/dspinst.h" | |||
void applyGain(int16_t *data, int32_t mult) | |||
{ | |||
uint32_t *p = (uint32_t *)data; |
@@ -1,9 +1,6 @@ | |||
#include "Audio.h" | |||
#include "output_dac.h" | |||
#include "utility/pdb.h" | |||
// #define PDB_CONFIG (PDB_SC_TRGSEL(15) | PDB_SC_PDBEN | PDB_SC_CONT) | |||
// #define PDB_PERIOD 1087 // 48e6 / 44100 | |||
#if defined(__MK20DX256__) | |||
DMAMEM static uint16_t dac_buffer[AUDIO_BLOCK_SAMPLES*2]; |
@@ -1,6 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "output_i2s.h" | |||
// MCLK needs to be 48e6 / 1088 * 256 = 11.29411765 MHz -> 44.117647 kHz sample rate | |||
// Possible to create using fractional divider for all USB-compatible Kinetis: | |||
@@ -15,7 +13,6 @@ | |||
// clock, which has audio band jitter from the PLL | |||
audio_block_t * AudioOutputI2S::block_left_1st = NULL; | |||
audio_block_t * AudioOutputI2S::block_right_1st = NULL; | |||
audio_block_t * AudioOutputI2S::block_left_2nd = NULL; | |||
@@ -57,8 +54,6 @@ void AudioOutputI2S::begin(void) | |||
} | |||
void dma_ch0_isr(void) | |||
{ | |||
const int16_t *src, *end; |
@@ -1,7 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "output_pwm.h" | |||
audio_block_t * AudioOutputPWM::block_1st = NULL; | |||
audio_block_t * AudioOutputPWM::block_2nd = NULL; |
@@ -1,9 +1,7 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "play_memory.h" | |||
#include "utility/dspinst.h" | |||
void AudioPlayMemory::play(const unsigned int *data) | |||
{ | |||
uint32_t format; |
@@ -1,7 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
#include "play_sd_raw.h" | |||
void AudioPlaySDcardRAW::begin(void) |
@@ -1,8 +1,4 @@ | |||
#include "Audio.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
#include "play_sd_wav.h" | |||
#define STATE_DIRECT_8BIT_MONO 0 // playing mono at native sample rate | |||
#define STATE_DIRECT_8BIT_STEREO 1 // playing stereo at native sample rate |
@@ -1,6 +1,5 @@ | |||
#include "Audio.h" | |||
#include "synth_tonesweep.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
// TODO: this object should be renamed to AudioSynthToneSweep |
@@ -1,10 +1,8 @@ | |||
#include "Audio.h" | |||
#include "synth_waveform.h" | |||
#include "arm_math.h" | |||
#include "utility/dspinst.h" | |||
#ifdef ORIGINAL_AUDIOSYNTHWAVEFORM | |||
/******************************************************************/ | |||
// PAH - add ramp-up and ramp-down to the onset of the wave |