26 lines
636 B
Plaintext
26 lines
636 B
Plaintext
|
$OpenBSD: patch-mksong_sh,v 1.1 2002/03/18 15:37:37 wilfried Exp $
|
||
|
--- mksong.sh.orig Sat Dec 1 18:32:39 2001
|
||
|
+++ mksong.sh Mon Mar 18 08:21:58 2002
|
||
|
@@ -1,4 +1,4 @@
|
||
|
-#!/bin/bash
|
||
|
+# !/bin/sh
|
||
|
|
||
|
set -e
|
||
|
|
||
|
@@ -6,9 +6,12 @@ echo target sampling rate is $1
|
||
|
echo input file is $2
|
||
|
echo output file is $3
|
||
|
|
||
|
+ftmp=`mktemp`
|
||
|
+mv "${ftmp}" "${ftmp}".wav
|
||
|
+
|
||
|
echo first decoding mp3...
|
||
|
-amp -convert -w $2 delme.wav
|
||
|
+madplay --output=wave:"${ftmp}".wav "${2}"
|
||
|
echo now converting into raw and resampling
|
||
|
-sox delme.wav -r $1 -t raw -u -b -c 1 $3
|
||
|
-rm delme.wav
|
||
|
+sox "${ftmp}".wav -r "${1}" -t raw -u -b -c 1 "${3}"
|
||
|
+rm -f "${ftmp}".wav
|
||
|
echo done.
|