From 11bd5d218854e4a9cc53a0b799099fadbd7b94c6 Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Sat, 17 Feb 2018 15:24:29 -0800 Subject: [PATCH] Set builtindac mamber before calling SetPinout Hans-J. Ubben found a bug where the pinout wasn't being set properly on ESP32s because the builtInDAC member was not set before calling SetPinout. Fix per his suggestion. --- src/AudioOutputI2S.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AudioOutputI2S.cpp b/src/AudioOutputI2S.cpp index 0eec93e..3c1b17d 100644 --- a/src/AudioOutputI2S.cpp +++ b/src/AudioOutputI2S.cpp @@ -28,8 +28,9 @@ AudioOutputI2S::AudioOutputI2S(int port, bool builtInDAC, int use_apll) { - portNo = port; - i2sOn = false; + this->portNo = port; + this->i2sOn = false; + this->builtInDAC = builtInDAC; #ifdef ESP32 if (!i2sOn) { if (use_apll == APLL_AUTO) { @@ -76,7 +77,6 @@ AudioOutputI2S::AudioOutputI2S(int port, bool builtInDAC, int use_apll) channels = 2; SetGain(1.0); SetRate(44100); // Default - this->builtInDAC = builtInDAC; } AudioOutputI2S::~AudioOutputI2S()