Arduino library to play MOD, WAV, FLAC, MIDI, RTTTL, MP3, and AAC files on I2S DACs or with a software emulated delta-sigma DAC on the ESP8266 and ESP32
ESP32: When calling the destructor of AudioOutputI2S after having called the stop function, followed by creating of a new AudioOutputI2S object, an error is shown "I2S: register I2S object to platform failed" in IDF 4.4.
This is because i2s_driver_uninstall had not been called in the destructor because i2sOn was already set to false in the function stop.
It is necessary to call i2s_driver_uninstall before i2s_driver_install is being called again in the begin function. That is why I moved it to the stop function
ESP8266 : the same problem with i2s_end not being called called when calling the stop function followed by the destructor bacause i2sOn is set to false in the stop function.
This results in new call to i2s_rxtx_begin without first having called i2s_end.
My idea is that also the noise on DAC is less after calling the function stop - but I am not sure about this
It is necessary to call i2s_driver_uninstall before i2s_driver_install is being called again in the begin function. That is why I moved it to the stop function
My idea is that also the noise on DAC is less after calling the function stop - but I am not sure about this