From 34e8433916404684d14350d0794f672e015d3a7d Mon Sep 17 00:00:00 2001 From: dronus Date: Thu, 17 Oct 2019 22:32:54 +0200 Subject: [PATCH] Added Teensy internal DAC output option and set defaut output. --- MicroDexed.ino | 6 ++++++ config.h | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 8f8ae99..f562836 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -80,6 +80,10 @@ AudioOutputI2S i2s1; AudioConnection patchCord11(volume_r, 0, i2s1, 0); AudioConnection patchCord12(volume_l, 0, i2s1, 1); AudioControlWM8731master wm8731_1; +#elif defined(TEENSY_DAC) +AudioOutputAnalogStereo dacOut; +AudioConnection patchCord11(volume_r, 0, dacOut, 0); +AudioConnection patchCord12(volume_l, 0, dacOut, 1); #else AudioOutputPT8211 pt8211_1; AudioConnection patchCord11(volume_r, 0, pt8211_1, 0); @@ -190,6 +194,8 @@ void setup() wm8731_1.enable(); wm8731_1.volume(1.0); Serial.println(F("TGA board enabled.")); +#elif defined(TEENSY_DAC) + Serial.println(F("Internal DAC enabled.")); #else Serial.println(F("PT8211 enabled.")); #endif diff --git a/config.h b/config.h index 87a82ed..337edab 100644 --- a/config.h +++ b/config.h @@ -51,9 +51,11 @@ #define MIDI_DEVICE_NUMBER 0 // AUDIO -// If nothing is defined PT8211 is used as audio output device! -#define TEENSY_AUDIO_BOARD 1 -//#define TGA_AUDIO_BOARD +// If nothing is defined Teensy internal DAC is used as audio output device! +// Left and right channel audio signal is presented on pins A21 and A22. +#define TEENSY_DAC +// #define TEENSY_AUDIO_BOARD 1 +// #define TGA_AUDIO_BOARD //************************************************************************************************* //* MIDI SETTINGS