Sfoglia il codice sorgente

Move the last couple ojects to their own files

dds
PaulStoffregen 10 anni fa
parent
commit
bdc11e316d
2 ha cambiato i file con 28 aggiunte e 23 eliminazioni
  1. +27
    -0
      print.cpp
  2. +1
    -23
      synth_tonesweep.cpp

+ 27
- 0
print.cpp Vedi File

@@ -0,0 +1,27 @@
#include "Audio.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;
uint32_t i;

Serial.println("AudioPrint::update");
Serial.println(name);
block = receiveReadOnly();
if (block) {
for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) {
Serial.print(block->data[i]);
Serial.print(", ");
if ((i % 12) == 11) Serial.println();
}
Serial.println();
release(block);
}
}


Audio.cpp → synth_tonesweep.cpp Vedi File

@@ -3,29 +3,7 @@
#include "utility/dspinst.h"



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


void AudioPrint::update(void)
{
audio_block_t *block;
uint32_t i;

Serial.println("AudioPrint::update");
Serial.println(name);
block = receiveReadOnly();
if (block) {
for (i=0; i < AUDIO_BLOCK_SAMPLES; i++) {
Serial.print(block->data[i]);
Serial.print(", ");
if ((i % 12) == 11) Serial.println();
}
Serial.println();
release(block);
}
}

// TODO: this object should be renamed to AudioSynthToneSweep

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


Loading…
Annulla
Salva