Bladeren bron

Add dacVolumeRamp documentation

dds
PaulStoffregen 8 jaren geleden
bovenliggende
commit
3cc5a15122
3 gewijzigde bestanden met toevoegingen van 23 en 3 verwijderingen
  1. +2
    -0
      examples/HardwareTesting/SGTL5000/VolumeRamp/VolumeRamp.ino
  2. +18
    -3
      gui/index.html
  3. +3
    -0
      keywords.txt

+ 2
- 0
examples/HardwareTesting/SGTL5000/VolumeRamp/VolumeRamp.ino Bestand weergeven

@@ -7,6 +7,8 @@
// time, to prevent a sudden pop or click sound. You could achieve this by adding
// code to change the volume setting in very small steps over time, but the
// SGTL5000 can do it for you automatically.
//
// This example was originally contributed by Hedde Bosman

#include <Audio.h>
#include <Wire.h>

+ 18
- 3
gui/index.html Bestand weergeven

@@ -2551,14 +2551,27 @@ double s_freq = .0625;</p>
signal level. The ranges is 0 to 1.0, with the default (no digital attenuation)
at 1.0.
</p>
<p class=desc>dacVolume uses zero-crossing detect to avoid clicks, and ramping is handled by
the chip so that a new volume may be set directly in a single call.
<p class=desc>dacVolume uses zero-crossing detect to avoid clicks, and graceful
ramping is handled by the chip so that a new volume may be set directly in
a single call.
</p>
<p class=func><span class=keyword>dacVolume</span>(left, right);</p>
<p class=desc>Adjust the digital output volume separately on left and
right channels.
</p>

<p class=func><span class=keyword>dacVolumeRamp</span>();</p>
<p class=desc>Enable graceful volume ramping. The dacVolume adjusts gradually using
an exponential curve. Pops or loud clicks are avoided when making large
changes in volume level.
</p>
<p class=func><span class=keyword>dacVolumeRampLinear</span>();</p>
<p class=desc>Enable faster volume ramping. A slight click may be heard during a
large volume change.
</p>
<p class=func><span class=keyword>dacVolumeRampDisable</span>();</p>
<p class=desc>Do not use any gradual ramping. The zero cross feature still helps
for small changes, but large volume changes may produce a pop or click.
</p>

<h3>Audio Processor</h3>

@@ -2731,6 +2744,8 @@ value frequency
</p>
<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; SGTL5000 &gt; CalcBiquadToneControlDAP
</p>
<p class=exam>File &gt; Examples &gt; Audio &gt; HardwareTesting &gt; SGTL5000 &gt; VolumeRamp
</p>
<h3>Notes</h3>
<p>TODO: add example with rock/classical/speech presets, where rock uses bass boost
and surround enhancement while speech uses bandpass filtering and auto volume control

+ 3
- 0
keywords.txt Bestand weergeven

@@ -100,6 +100,9 @@ micGain KEYWORD2
lineInLevel KEYWORD2
lineOutLevel KEYWORD2
dacVolume KEYWORD2
dacVolumeRamp KEYWORD2
dacVolumeRampLinear KEYWORD2
dacVolumeRampDisable KEYWORD2
adcHighPassFilterEnable KEYWORD2
adcHighPassFilterFreeze KEYWORD2
adcHighPassFilterDisable KEYWORD2

Laden…
Annuleren
Opslaan