Allow playing wav files via HTTPStream (#224)
* ReadWAVInfo(): print error message if seek() fails * AudioFileSourceHTTPStream::seek() print error message - not implemented * AudioFileSourceBuffer::seek if SEEK_CUR and seek_len < writePtr keep the buffer (fix for HTTPStream) * Update AudioFileSourceBuffer.cpp
This commit is contained in:
1 parent
16bd2a7b06
commit
074dfd47b0
3 files changed
+16
-7
No files matched your search
@@ -242,10 +242,13 @@ bool AudioGeneratorWAV::ReadWAVInfo()
|
||||
Serial.printf_P(PSTR("AudioGeneratorWAV::ReadWAVInfo: failed to read WAV data\n"));
|
||||
return false;
|
||||
};
|
||||
file->seek(u32, SEEK_CUR);
|
||||
if(!file->seek(u32, SEEK_CUR)) {
|
||||
Serial.printf_P(PSTR("AudioGeneratorWAV::ReadWAVInfo: failed to read WAV data, seek failed\n"));
|
||||
return false;
|
||||
}
|
||||
} while (1);
|
||||
if (!file->isOpen()) {
|
||||
Serial.printf_P(PSTR("AudioGeneratorWAV::ReadWAVInfo: cannot read WAV, file is not open \n"));
|
||||
Serial.printf_P(PSTR("AudioGeneratorWAV::ReadWAVInfo: cannot read WAV, file is not open\n"));
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user