From 907ba61c4b814eae3d650449937745f209fe4f6c Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Thu, 26 Aug 2021 14:24:26 +0200 Subject: [PATCH] Fix for correct sample length. --- addon/tools/wav2c.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/addon/tools/wav2c.sh b/addon/tools/wav2c.sh index bd03b22..d8233b4 100755 --- a/addon/tools/wav2c.sh +++ b/addon/tools/wav2c.sh @@ -173,6 +173,7 @@ do fill_mod=`expr "${sample['len']}" % "${AUDIO_BLOCK_SIZE}"` fill=`expr "${AUDIO_BLOCK_SIZE}" - "${fill_mod}"` sample['len']=`expr "${sample['len']}" + "${fill}"` + sample['len']=`expr "${sample['len']}" / 2` echo "// Converted from ${sample['filename']}, length = ${sample['len']} bytes" >> "${DRUMSET_H}" echo "PROGMEM const int8_t ${sample['name']}[] = {" >> "${DRUMSET_H}"