turns out it doesn't need to be audible...

This commit is contained in:
ed 2024-04-05 23:06:26 +00:00
parent 5ab54763c6
commit b88cc7b5ce

View file

@ -12,17 +12,18 @@ fast=1
fast=
echo
cd /dev/shm
rm -f -- a.*.mp3 a.*.mp3.gz
mkdir -p /dev/shm/$1
cd /dev/shm/$1
find -maxdepth 1 -type f -iname 'a.*.mp3*' -delete
min=99999999
for freq in 425; do # {400..500}
for vol in 24; do # {10..30}
for vol in 0; do # {10..30}
for kbps in 32; do
for fdur in 1124; do # {800..1200}
for fdu2 in 1042; do # {800..1200}
for ftyp in h; do # q h t l p
for ofs1 in 801; do # {0..4096}
for ofs1 in 9214; do # {0..32768}
for ofs2 in 0; do # {0..4096}
for ofs3 in 0; do # {0..4096}
for nores in --nores; do # '' --nores
@ -36,7 +37,7 @@ tail -c +$ofs3 s0.pcm >s0c.pcm
cat s{0a,1,0,0b,1,0c}.pcm > a.pcm
lame --silent -r -s 48 --bitwidth 16 --signed a.pcm -m j --resample 48 -b $kbps -q 0 $nores $f.mp3
if [ $fast ]
then gzip -c <$f.mp3 >$f.mp3.gz
then gzip -c9 <$f.mp3 >$f.mp3.gz
else pigz -c11 -I1 <$f.mp3 >$f.mp3.gz
fi
sz=$(wc -c <$f.mp3.gz)
@ -47,14 +48,14 @@ printf '\033[A%d %s\033[K\n' $sz $f
done;done;done;done;done;done;done;done;done;done
true
f=a.b32--nores-f425-v24-h1124-1042-o801-0-0.mp3
f=a.b32--nores-f425-v0-h1124-1042-o9214-0-0.mp3
[ $fast ] &&
pigz -c11 -I1 <$f >busy.mp3.gz ||
mv $f.gz busy.mp3.gz
sz=$(wc -c <busy.mp3.gz)
[ "$sz" -eq 707 ] &&
[ "$sz" -eq 106 ] &&
echo busy.mp3 built successfully ||
echo WARNING: unexpected size of busy.mp3
rm -f a.*.mp3 a.*.mp3.gz
find -maxdepth 1 -type f -iname 'a.*.mp3*' -delete