Ver código fonte

Add AudioSynthWaveformDc read()

dds
PaulStoffregen 7 anos atrás
pai
commit
15e2c363b3
2 arquivos alterados com 8 adições e 0 exclusões
  1. +4
    -0
      gui/index.html
  2. +4
    -0
      synth_dc.h

+ 4
- 0
gui/index.html Ver arquivo

@@ -2071,6 +2071,10 @@ The actual packets are taken
be specified, but periods longer than 1 second may be automatically
shortened for small level changes, due to numerical precision limits.
</p>
<p class=func><span class=keyword>read</span>();</p>
<p class=desc>Read the current level. Returns -1.0 to 1.0. This can be
useful for monitoring the amplitude after configuring a slow change.
</p>
<!--
<h3>Examples</h3>
<p class=exam>File &gt; Examples &gt; Audio &gt;

+ 4
- 0
synth_dc.h Ver arquivo

@@ -127,6 +127,10 @@ public:
state = 1;
__enable_irq();
}
float read(void) {
int32_t m = magnitude;
return (float)m * (1.0 / 2147418112.0);
}
virtual void update(void);
private:
uint8_t state; // 0=steady output, 1=transitioning

Carregando…
Cancelar
Salvar