Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result from wavfile.read() not checked in play_sd_wav.cpp #411

Open
StephanLuik opened this issue Nov 8, 2021 · 0 comments
Open

Result from wavfile.read() not checked in play_sd_wav.cpp #411

StephanLuik opened this issue Nov 8, 2021 · 0 comments

Comments

@StephanLuik
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant