Просмотр исходного кода

Rename AudioToneSweep to AudioSynthToneSweep

dds
PaulStoffregen 10 лет назад
Родитель
Сommit
4d67342153
3 измененных файлов: 11 добавлений и 10 удалений
  1. +3
    -3
      examples/ToneSweep/ToneSweep.ino
  2. +6
    -5
      synth_tonesweep.cpp
  3. +2
    -2
      synth_tonesweep.h

+ 3
- 3
examples/ToneSweep/ToneSweep.ino Просмотреть файл

@@ -30,7 +30,7 @@ The audio board uses the following pins.
#include <SPI.h>
#include <Bounce.h>

AudioToneSweep myEffect;
AudioSynthToneSweep myEffect;
AudioOutputI2S audioOutput; // audio shield: headphones & line-out

// The tone sweep goes to left and right channels
@@ -64,7 +64,7 @@ void setup(void)
Serial.println("setup done");

if(!myEffect.begin(t_ampx,t_lox,t_hix,t_timex)) {
Serial.println("AudioToneSweep - begin failed");
Serial.println("AudioSynthToneSweep - begin failed");
while(1);
}
// wait for the sweep to end
@@ -72,7 +72,7 @@ void setup(void)

// and now reverse the sweep
if(!myEffect.begin(t_ampx,t_hix,t_lox,t_timex)) {
Serial.println("AudioToneSweep - begin failed");
Serial.println("AudioSynthToneSweep - begin failed");
while(1);
}
// wait for the sweep to end

+ 6
- 5
synth_tonesweep.cpp Просмотреть файл

@@ -32,12 +32,12 @@
// Written by Pete (El Supremo) Feb 2014


boolean AudioToneSweep::begin(short t_amp,int t_lo,int t_hi,float t_time)
boolean AudioSynthToneSweep::begin(short t_amp,int t_lo,int t_hi,float t_time)
{
double tone_tmp;
if(0) {
Serial.print("AudioToneSweep.begin(tone_amp = ");
Serial.print("AudioSynthToneSweep.begin(tone_amp = ");
Serial.print(t_amp);
Serial.print(", tone_lo = ");
Serial.print(t_lo);
@@ -78,13 +78,14 @@ if(0) {



unsigned char AudioToneSweep::busy(void)
unsigned char AudioSynthToneSweep::busy(void)
{
return(sweep_busy);
}

int b_count = 0;
void AudioToneSweep::update(void)
static int b_count = 0; // TODO: what's this for?

void AudioSynthToneSweep::update(void)
{
audio_block_t *block;
short *bp;

+ 2
- 2
synth_tonesweep.h Просмотреть файл

@@ -28,10 +28,10 @@
// A u d i o T o n e S w e e p
// Written by Pete (El Supremo) Feb 2014

class AudioToneSweep : public AudioStream
class AudioSynthToneSweep : public AudioStream
{
public:
AudioToneSweep(void) :
AudioSynthToneSweep(void) :
AudioStream(0,NULL), sweep_busy(0)
{ }


Загрузка…
Отмена
Сохранить