In the void AudioPlaySdWav::update(void) method, the result of the file read() operation wavfile.read() is not checked for -1 status, indicating a read error. The buffer_length variable is declared as unsigned, while it should be a signed variable.
Steps To Reproduce Problem
I came across this error when reading from an SDcard while some other SPI device was messing up the SPI data communications.
Hardware & Software
Teensy 4.1 with pins
Audio Adaptor rev. D
Arduino version 1.8.13
Teensyduino version 1.53
Windows 10 Pro 21H1
Description
In the void AudioPlaySdWav::update(void) method, the result of the file read() operation wavfile.read() is not checked for -1 status, indicating a read error. The buffer_length variable is declared as unsigned, while it should be a signed variable.
Steps To Reproduce Problem
I came across this error when reading from an SDcard while some other SPI device was messing up the SPI data communications.
Hardware & Software
Teensy 4.1 with pins Audio Adaptor rev. D Arduino version 1.8.13 Teensyduino version 1.53 Windows 10 Pro 21H1
Arduino Sketch
Errors or Incorrect Output