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.
This commit is contained in:
1 parent
01d9daeb12
commit
11bd5d2188
1 file changed
+3
-3
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user