summaryrefslogtreecommitdiffstats
path: root/quantum/audio/audio.c
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2016-12-19 11:18:18 -0500
committerJack Humbert <jack.humb@gmail.com>2016-12-19 11:18:18 -0500
commit06c64bbff3e228df542149acde64eadaf59b9b0f (patch)
tree9bda86e11116ba8f66de345fd4ce940c2698d630 /quantum/audio/audio.c
parentae95834f5af7404c04e6fe3446019046278d814b (diff)
rgb clean-up, api clean-up
Diffstat (limited to 'quantum/audio/audio.c')
-rw-r--r--quantum/audio/audio.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/quantum/audio/audio.c b/quantum/audio/audio.c
index ead5fbf3e9..2a315fd168 100644
--- a/quantum/audio/audio.c
+++ b/quantum/audio/audio.c
@@ -77,6 +77,7 @@ static bool audio_initialized = false;
audio_config_t audio_config;
uint16_t envelope_index = 0;
+bool glissando = true;
void audio_init()
{
@@ -205,13 +206,17 @@ ISR(TIMER3_COMPA_vect)
freq = frequencies[voice_place];
#endif
} else {
- if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
- frequency = frequency * pow(2, 440/frequency/12/2);
- } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
- frequency = frequency * pow(2, -440/frequency/12/2);
+ if (glissando) {
+ if (frequency != 0 && frequency < frequencies[voices - 1] && frequency < frequencies[voices - 1] * pow(2, -440/frequencies[voices - 1]/12/2)) {
+ frequency = frequency * pow(2, 440/frequency/12/2);
+ } else if (frequency != 0 && frequency > frequencies[voices - 1] && frequency > frequencies[voices - 1] * pow(2, 440/frequencies[voices - 1]/12/2)) {
+ frequency = frequency * pow(2, -440/frequency/12/2);
+ } else {
+ frequency = frequencies[voices - 1];
+ }
} else {
frequency = frequencies[voices - 1];
- }
+ }
#ifdef VIBRATO_ENABLE
if (vibrato_strength > 0) {