Enabled surround sound (testing only)

Enabled bass enhancer (testing only)
Fix a bug in UI for volume.
Fixed wrong repository host in DEBUG code.
pull/4/head
Holger Wirtz 5 years ago
parent c046111e40
commit e684b7307c
  1. 20
      MicroDexed.ino
  2. 6
      UI.cpp

@ -137,7 +137,7 @@ void setup()
delay(220);
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed"));
Serial.println(F("(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>"));
Serial.println(F("https://github.com/dcoredump/MicroDexed"));
Serial.println(F("https://codeberg.org/dcoredump/MicroDexed"));
Serial.print(F("Version: "));
Serial.println(VERSION);
Serial.println(F("<setup start>"));
@ -163,10 +163,20 @@ void setup()
sgtl5000_1.audioPostProcessorEnable();
sgtl5000_1.autoVolumeControl(1, 1, 1, 0.9, 0.01, 0.05);
sgtl5000_1.autoVolumeEnable();
//sgtl5000_1.surroundSoundEnable();
//sgtl5000_1.surroundSound(width, select);
//sgtl5000_1.enhanceBassEnable();
//sgtl5000_1.enhanceBass(lr_lev, bass_lev, hpf_bypass, cutoff);
sgtl5000_1.surroundSoundEnable();
sgtl5000_1.surroundSound(7, 2); // Configures virtual surround width from 0 (mono) to 7 (widest). select may be set to 1 (disable), 2 (mono input) or 3 (stereo input).
sgtl5000_1.enhanceBassEnable();
sgtl5000_1.enhanceBass(1.0, 0.2, 1, 2); // Configures the bass enhancement by setting the levels of the original stereo signal and the bass-enhanced mono level which will be mixed together. The high-pass filter may be enabled (0) or bypassed (1).
/* The cutoff frequency is specified as follows:
value frequency
0 80Hz
1 100Hz
2 125Hz
3 150Hz
4 175Hz
5 200Hz
6 225Hz
*/
//sgtl5000_1.eqBands(bass, mid_bass, midrange, mid_treble, treble);
Serial.println(F("Teensy-Audio-Board enabled."));
#elif defined(TGA_AUDIO_BOARD)

@ -215,7 +215,7 @@ void handle_ui(void)
//set_volume(float(map(enc[i].read(), 0, ENC_VOL_STEPS, 0, 100)) / 100, configuration.pan);
tmp = (float(map(enc[i].read(), 0, ENC_VOL_STEPS, 0, 100)) / 100) - configuration.vol;
soften_volume.diff = tmp / SOFTEN_VALUE_CHANGE_STEPS;
soften_volume.steps = SOFTEN_VALUE_CHANGE_STEPS;
soften_volume.steps = SOFTEN_VALUE_CHANGE_STEPS + 1;
#ifdef DEBUG
Serial.print(F("Setting soften volume from: "));
Serial.print(configuration.vol, 5);
@ -445,13 +445,13 @@ void ui_show_volume(void)
}
// show value
lcd.show(0, LCD_CHARS - 3, 3, configuration.vol * 100);
lcd.show(0, LCD_CHARS - 3, 3, (configuration.vol * 100 + 0.5));
if (pos != old_pos)
{
lcd.show(1, pos, 1, "*");
lcd.show(1, old_pos, 1, " ");
old_pos=pos;
old_pos = pos;
}
ui_state = UI_VOLUME;

Loading…
Cancel
Save