Fix for correct sample length.

pull/98/head
Holger Wirtz 3 years ago
parent aee3fde977
commit 907ba61c4b
  1. 1
      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}"

Loading…
Cancel
Save