Fix file source rewind and read after it is finished

This commit is contained in:
Nonoo 2021-03-22 22:12:55 +01:00
parent 3b657484b2
commit ad579d514b

View File

@ -43,6 +43,7 @@ public:
file.read(_data, size);
int read = file.gcount();
if (read < size) {
file.clear();
file.seekg(sizeof(WavHeader_t));
file.read(&_data[read], size - read);
}