Przeglądaj źródła

Each object includes only required headers

dds
PaulStoffregen 10 lat temu
rodzic
commit
c274463185
23 zmienionych plików z 24 dodań i 82 usunięć
  1. +2
    -4
      analyze_fft256.cpp
  2. +0
    -1
      analyze_fft256.h
  3. +1
    -3
      analyze_print.cpp
  4. +1
    -4
      analyze_tonedetect.cpp
  5. +1
    -4
      control_sgtl5000.cpp
  6. +1
    -4
      control_wm8731.cpp
  7. +1
    -4
      effect_chorus.cpp
  8. +1
    -5
      effect_fade.cpp
  9. +1
    -5
      effect_flange.cpp
  10. +1
    -3
      filter_biquad.cpp
  11. +1
    -5
      filter_fir.cpp
  12. +1
    -0
      filter_fir.h
  13. +1
    -2
      input_adc.cpp
  14. +2
    -3
      input_i2s.cpp
  15. +1
    -4
      mixer.cpp
  16. +1
    -4
      output_dac.cpp
  17. +1
    -6
      output_i2s.cpp
  18. +1
    -4
      output_pwm.cpp
  19. +1
    -3
      play_memory.cpp
  20. +1
    -4
      play_sd_raw.cpp
  21. +1
    -5
      play_sd_wav.cpp
  22. +1
    -2
      synth_tonesweep.cpp
  23. +1
    -3
      synth_waveform.cpp

+ 2
- 4
analyze_fft256.cpp Wyświetl plik

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

+ 0
- 1
analyze_fft256.h Wyświetl plik

@@ -2,7 +2,6 @@
#define analyze_fft256_h_

#include "AudioStream.h"
#include "arm_math.h"

// windows.c
extern "C" {

+ 1
- 3
analyze_print.cpp Wyświetl plik

@@ -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
- 4
analyze_tonedetect.cpp Wyświetl plik

@@ -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
- 4
control_sgtl5000.cpp Wyświetl plik

@@ -1,7 +1,4 @@
#include "Audio.h"
#include "arm_math.h"


#include "control_sgtl5000.h"
#include "Wire.h"

#define CHIP_ID 0x0000

+ 1
- 4
control_wm8731.cpp Wyświetl plik

@@ -1,7 +1,4 @@
#include "Audio.h"
#include "arm_math.h"


#include "control_wm8731.h"
#include "Wire.h"

#define WM8731_I2C_ADDR 0x1A

+ 1
- 4
effect_chorus.cpp Wyświetl plik

@@ -1,7 +1,4 @@
#include "Audio.h"
#include "arm_math.h"
#include "utility/dspinst.h"

#include "effect_chorus.h"

/******************************************************************/


+ 1
- 5
effect_fade.cpp Wyświetl plik

@@ -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
- 5
effect_flange.cpp Wyświetl plik

@@ -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
- 3
filter_biquad.cpp Wyświetl plik

@@ -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
- 5
filter_fir.cpp Wyświetl plik

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

+ 1
- 0
filter_fir.h Wyświetl plik

@@ -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
- 2
input_adc.cpp Wyświetl plik

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

+ 2
- 3
input_i2s.cpp Wyświetl plik

@@ -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
- 4
mixer.cpp Wyświetl plik

@@ -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
- 4
output_dac.cpp Wyświetl plik

@@ -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
output_i2s.cpp Wyświetl plik

@@ -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
- 4
output_pwm.cpp Wyświetl plik

@@ -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
- 3
play_memory.cpp Wyświetl plik

@@ -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
- 4
play_sd_raw.cpp Wyświetl plik

@@ -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
- 5
play_sd_wav.cpp Wyświetl plik

@@ -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
- 2
synth_tonesweep.cpp Wyświetl plik

@@ -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
- 3
synth_waveform.cpp Wyświetl plik

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

Ładowanie…
Anuluj
Zapisz