Nimbin[12]?SDL & Graphics / SDL_Game_CPP / scripts/audio/audio_normalize.sh

SDL_Game_CPP git · main

SDL game in C++

sdl game c++ · first commit 2026-03-24 · last commit 2026-03-24 (8 months ago) · synced 1 hour ago · upstream: codeberg.org/Studying_at_HsNR/SDL_Game_CPP

C++ 99.3%
git clone https://git.christianimmanuel.de/sdl-graphics/SDL_Game_CPP.gitwget https://git.christianimmanuel.de/sdl-graphics/SDL_Game_CPP/archive/SDL_Game_CPP.tar.gz
scripts/audio/audio_normalize.sh 558 B · 30 lines raw
#!/bin/bash

set -euo pipefail

SRC_DIR="music"
DST_DIR="music_cleaned"

mkdir -p "$DST_DIR"

for f in "$SRC_DIR"/*.wav; do
    [ -e "$f" ] || continue
    name=$(basename "$f")

    ffmpeg -hide_banner -loglevel error \
        -i "$f" \
        -af "
            highpass=f=120,
            afftdn=nf=-20,
            agate=threshold=-40dB:ratio=2:attack=5:release=50,
            loudnorm=I=-18:TP=-1.5:LRA=7
        " \
        -ar 44100 \
        -ac 1 \
        -c:a pcm_s16le \
        "$DST_DIR/$name"

    echo "Processed: $name"
done

echo "Done."