]> de.git.xonotic.org Git - xonotic/mediasource.git/blobdiff - sound/weapons/loopfinder/findloop.sh
findloop fixes
[xonotic/mediasource.git] / sound / weapons / loopfinder / findloop.sh
index ebbdb20c450bd573f0c4fb1c0574f8c36d578a47..b71aeb2867a039619a113138cedba39a1b80f4bb 100755 (executable)
@@ -4,11 +4,12 @@ infile=$1
 outfile=$2
 end=$3
 guess=$4
-fftsize=${5:-32768}
+guess2=$5
+fftsize=${6:-32768}
 
-gcc -o findloop findloop.c -lfftw3 -Wall -Wextra -ffast-math -lsndfile -O3
-./findloop "$infile" "$fftsize" "$end" "$guess" temp.wav | while read -r SAMPLES SECONDS; do
-       oggenc -q 3 -o "$outfile" -c LOOP_START=$SAMPLES temp.wav
+gcc -o findloop findloop.c -lfftw3 -Wall -Wextra -ffast-math -lsndfile -lm -O3
+./findloop "$infile" "$fftsize" "$end" "$guess" "$guess2" temp.wav | while read -r SAMPLES SECONDS; do
+       oggenc -q 10 -o "$outfile" -c LOOP_START=$SAMPLES temp.wav
        rm -f temp.wav
        echo "To repeat, seek to $SAMPLES"
        vorbisgain "$outfile"