From 7acd9d4a3b5c4f65b919930b6c67c19147ea5b13 Mon Sep 17 00:00:00 2001
From: Petr Klima
Date: Mon, 28 Sep 2020 17:47:30 +1000
Subject: [PATCH] Fix reading of WAV loop region length (#84)
---
Audio/WAVFileReader.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Audio/WAVFileReader.cpp b/Audio/WAVFileReader.cpp
index 279dc21..0c37063 100644
--- a/Audio/WAVFileReader.cpp
+++ b/Audio/WAVFileReader.cpp
@@ -400,7 +400,7 @@ namespace
{
// Return 'forward' loop
*pLoopStart = loops[j].start;
- *pLoopLength = loops[j].end + loops[j].start + 1;
+ *pLoopLength = loops[j].end - loops[j].start + 1;
return S_OK;
}
}