Skip to content

Commit

Permalink
chore: update audio file generation script
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Dec 22, 2023
1 parent d59b1ea commit a6e4c5f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .maintainer-scripts/audio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@

set -e

output_dir="$1"
duration=60

for bits in 8 16 20 24 32; do
sox -D -r10000 -b$bits -n audio/test$bits.wav synth 5 sine ${bits}00
sox -D -r10240 -b$bits -n $output_dir/test$bits.wav synth $duration sine ${bits}
for ch in 1 2 3 4 5 6; do
sox -D -r10000 -b$bits -n audio/test$bits.$ch.wav synth 5 sine ${bits}${ch}0
sox -D -M audio/test$bits.?.wav audio/test$bits-$ch.wav
sox -D -r10240 -b$bits -n $output_dir/test$bits.$ch.wav synth $duration sine ${bits} ${ch}
sox -D -M $output_dir/test$bits.?.wav $output_dir/test$bits-$ch.wav
done
rm audio/test$bits.?.wav
rm $output_dir/test$bits.?.wav
for fmt in aiff caf w64; do
sox -D audio/test$bits.wav audio/test$bits.$fmt
for ch in 1 2 3 4 5 6; do
sox -D audio/test$bits-$ch.wav audio/test$bits-$ch.$fmt
sox -D $output_dir/test$bits.wav $output_dir/test$bits.$fmt
for ch in 2 3 4 5 6; do
sox -D $output_dir/test$bits-$ch.wav $output_dir/test$bits-$ch.$fmt
done
done
done

0 comments on commit a6e4c5f

Please sign in to comment.