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}"