Added usb-audio output.

Removed TGA and PT8211 outputs due to heavy usage of the SGTL5000.
master
Holger Wirtz 5 years ago
parent a14a9ba633
commit 1b19fdb7f0
  1. 26
      MicroMDAEPiano.ino
  2. 5
      config.h

@ -74,21 +74,13 @@ AudioConnection patchCord13(freeverb_r, 0, mixer_r, 1);
AudioConnection patchCord14(freeverb_l, 0, mixer_l, 1);
AudioConnection patchCord15(mixer_r, volume_r);
AudioConnection patchCord16(mixer_l, volume_l);
#if defined(TEENSY_AUDIO_BOARD)
AudioOutputUSB usb1;
AudioConnection patchCord17(volume_r, 0, usb1, 0);
AudioConnection patchCord18(volume_l, 0, usb1, 1);
AudioOutputI2S i2s1;
AudioConnection patchCord17(volume_r, 0, i2s1, 0);
AudioConnection patchCord18(volume_l, 0, i2s1, 1);
AudioConnection patchCord19(volume_r, 0, i2s1, 0);
AudioConnection patchCord20(volume_l, 0, i2s1, 1);
AudioControlSGTL5000 sgtl5000_1;
#elif defined(TGA_AUDIO_BOARD)
AudioOutputI2S i2s1;
AudioConnection patchCord17(volume_r, 0, i2s1, 1);
AudioConnection patchCord18(volume_l, 0, i2s1, 0);
AudioControlWM8731master wm8731_1;
#else
AudioOutputPT8211 pt8211_1;
AudioConnection patchCord16(volume_r, 0, pt8211_1, 1);
AudioConnection patchCord17(volume_l, 0, pt8211_1, 0);
#endif
// Objects
mdaEPiano* ep;
@ -194,7 +186,6 @@ void setup()
AudioNoInterrupts();
AudioMemory(AUDIO_MEM);
#ifdef TEENSY_AUDIO_BOARD
sgtl5000_1.enable();
sgtl5000_1.dacVolumeRamp();
sgtl5000_1.dacVolume(1.0);
@ -207,13 +198,6 @@ void setup()
sgtl5000_1.autoVolumeEnable();
sgtl5000_1.enhanceBassEnable();
Serial.println(F("Teensy-Audio-Board enabled."));
#elif defined(TGA_AUDIO_BOARD)
wm8731_1.enable();
wm8731_1.volume(1.0);
Serial.println(F("TGA board enabled."));
#else
Serial.println(F("PT8211 enabled."));
#endif
#if defined (SHOW_DEBUG) && defined (SHOW_CPU_LOAD_MSEC)
// Initialize processor and memory measurements

@ -39,11 +39,6 @@
#define MIDI_DEVICE_USB 1
#define MIDI_DEVICE_USB_HOST 1
// AUDIO
// If nothing is defined PT8211 is used as audio output device!
#define TEENSY_AUDIO_BOARD 1
//#define TGA_AUDIO_BOARD 1
//*************************************************************************************************
//* MIDI SETTINGS
//*************************************************************************************************

Loading…
Cancel
Save