From 200937aa505ac8b1c8164fb7f109df9e12762eba Mon Sep 17 00:00:00 2001 From: Veikko Sariola Date: Wed, 27 May 2020 16:21:49 +0300 Subject: [PATCH] Fix single shot samples: only first half of them was getting played. --- scripts/parse_gmdls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/parse_gmdls.py b/scripts/parse_gmdls.py index 276712a..3944eaf 100644 --- a/scripts/parse_gmdls.py +++ b/scripts/parse_gmdls.py @@ -18,7 +18,7 @@ def read_chunk(file,indent=0): datablock = next((x[1] for x in data if x[0] == b"data")) wsmp = next((x[1] for x in data if x[0] == b"wsmp"), None) if "loopstart" not in wsmp: - loopstart,looplength = datablock["length"]/2-1,1 # For samples without loop, keep on repeating the last sample + loopstart,looplength = datablock["length"]-1,1 # For samples without loop, keep on repeating the last sample else: loopstart,looplength = wsmp["loopstart"],wsmp["looplength"] INFO = next((x[1] for x in data if x[0] == b"INFO"), None)