From 2d0ebd6918646f200aaf6891286d14146232e003 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 12 Mar 2013 02:45:36 +0100 Subject: [PATCH] only call sox when needed --- atom | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/atom b/atom index bfc42c8..00bbcb4 100755 --- a/atom +++ b/atom @@ -1244,7 +1244,17 @@ do case "$extendedtype" in *'Musepack '*) decodeMpcdec - sox_needed=1 + if (( ${destinationnormalize["$destination"]}))\ + || ( + [ -n "${destinationfrequency["$destination"]}" ]\ + && (( ${rate:-0} != ${destinationfrequency["$destination"]}))\ + ) || ( + [ -n "${destinationchannels["$destination"]}" ]\ + && (( ${channels:-0} != ${destinationchannels["$destination"]} )) + ) + then + sox_needed=1 + fi ;; *) decodeSox