Browse Source

rename AudioPeak to AudioAnalyzePeak

dds
PaulStoffregen 10 years ago
parent
commit
bf5c07685c
5 changed files with 11 additions and 11 deletions
  1. +3
    -3
      analyze_peakdetect.cpp
  2. +2
    -2
      analyze_peakdetect.h
  3. +1
    -1
      examples/Analysis/MonoPeakMeterAnalog/MonoPeakMeterAnalog.ino
  4. +2
    -2
      examples/Analysis/StereoPeakMeter/StereoPeakMeter.ino
  5. +3
    -3
      gui/list.html

+ 3
- 3
analyze_peakdetect.cpp View File

@@ -26,7 +26,7 @@

#include "analyze_peakdetect.h"

void AudioPeak::update(void)
void AudioAnalyzePeak::update(void)
{
audio_block_t *block;
const int16_t *p, *end;
@@ -48,7 +48,7 @@ void AudioPeak::update(void)
release(block);
}

void AudioPeak::begin(bool noReset)
void AudioAnalyzePeak::begin(bool noReset)
{
if(!noReset)
{
@@ -57,7 +57,7 @@ void AudioPeak::begin(bool noReset)
}
m_enabled=true;
}
uint16_t AudioPeak::Dpp(void)
uint16_t AudioAnalyzePeak::Dpp(void)
{
if(max>min) return max-min; else return 0;
}

+ 2
- 2
analyze_peakdetect.h View File

@@ -30,10 +30,10 @@
#include "AudioStream.h"

// TODO: this needs to be renamed to AudioAnalyzePeak
class AudioPeak : public AudioStream
class AudioAnalyzePeak : public AudioStream
{
public:
AudioPeak(void) : AudioStream(1, inputQueueArray) { }
AudioAnalyzePeak(void) : AudioStream(1, inputQueueArray) { }

virtual void update(void);


+ 1
- 1
examples/Analysis/MonoPeakMeterAnalog/MonoPeakMeterAnalog.ino View File

@@ -15,7 +15,7 @@ const int myInput = AUDIO_INPUT_LINEIN;
// const int myInput = AUDIO_INPUT_MIC;

AudioInputAnalog audioInput(A0); // A0 is pin 14, feel free to change.
AudioPeak peak_M;
AudioAnalyzePeak peak_M;
AudioOutputAnalog audioOutput; // DAC pin.

AudioConnection c1(audioInput,peak_M);

+ 2
- 2
examples/Analysis/StereoPeakMeter/StereoPeakMeter.ino View File

@@ -12,8 +12,8 @@ const int myInput = AUDIO_INPUT_LINEIN;
// const int myInput = AUDIO_INPUT_MIC;

AudioInputI2S audioInput; // audio shield: mic or line-in
AudioPeak peak_L;
AudioPeak peak_R;
AudioAnalyzePeak peak_L;
AudioAnalyzePeak peak_R;
AudioOutputI2S audioOutput; // audio shield: headphones & line-out

AudioConnection c1(audioInput,0,peak_L,0);

+ 3
- 3
gui/list.html View File

@@ -1409,7 +1409,7 @@


<script type="text/javascript">
RED.nodes.registerType('AudioPeak',{
RED.nodes.registerType('AudioAnalyzePeak',{
shortName: "peak",
inputs:1,
outputs:0,
@@ -1418,7 +1418,7 @@
icon: "arrow-in.png"
});
</script>
<script type="text/x-red" data-help-name="AudioPeak">
<script type="text/x-red" data-help-name="AudioAnalyzePeak">
<h3>Summary</h3>
<p>description</p>
<h3>Audio Connections</h3>
@@ -1445,7 +1445,7 @@
<h3>Notes</h3>
<p></p>
</script>
<script type="text/x-red" data-template-name="AudioPeak">
<script type="text/x-red" data-template-name="AudioAnalyzePeak">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">

Loading…
Cancel
Save