Last active
July 9, 2021 10:55
-
-
Save turbulentie/50b199d54dd9ad0fb480aedb166924b9 to your computer and use it in GitHub Desktop.
convert DSD to FLAC using dsf2flac bin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ----------------------------------------------------------------------------- | |
# dsd2flac: convert DSD to FLAC using dsf2flac bin | |
# ----------------------------------------------------------------------------- | |
function dsd2flac() { | |
shopt -s nullglob # Sets nullglob | |
OUTDIR="${PWD##*/} [FLAC 24-88200]" | |
rm -f *.flac && rm -rf "$OUTDIR" | |
for f in *.dff *.dsf ; do | |
dsf2flac -1 -s 6 -i "$f" "$f.flac" | |
if [[ $(find . -maxdepth 1 -iname '*.flac' 2>/dev/null | wc -l) != 0 ]]; then | |
mkdir -p "$OUTDIR" | |
mv *.flac "$OUTDIR" | |
fi | |
done | |
if [[ "$f" == "" ]]; then | |
echo "DSD files not found" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment