Fix the start of the arg “time” is not zero (#386)

In the first call of funcs[0](time), time should be zero but it was not.
This commit is contained in:
Hideaki Tai authored and GitHub committed 2021-04-13 07:35:52 -07:00
1 parent f974af9bf3
commit 8bf52d4c11
1 file changed
+1 -1
+1 -1
View File
@@ -71,7 +71,7 @@ uint32_t AudioFileSourceFunction::read(void* data, uint32_t len) {
i += 1;
} else {
// data bytes
float time = (float)p / (float)wav_header.format.avg_bytes_per_sec;
float time = (float)(p - sizeof(WavHeader)) / (float)wav_header.format.avg_bytes_per_sec;
float v = funcs[0](time);
for (size_t ch = 0; ch < wav_header.format.channels; ++ch) {
if (!is_unique && ch > 0)