From 6297dd6af7860d1cb07b1aa53e02367ab841395e Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Fri, 5 Apr 2013 01:53:01 +0200 Subject: [PATCH] decode opus --- atom | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/atom b/atom index f072134..33ab3ab 100755 --- a/atom +++ b/atom @@ -1081,6 +1081,11 @@ decodeMpcdec() { commandline=(mpcdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav") } +decodeOpusdec() { + tmpfile="${fileid}opusdec" + commandline=(opusdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav") +} + decodeFile() { if ! decodetaskid=$( Select tasks id <<<"key = $tmpfile" @@ -2036,7 +2041,27 @@ do decodeSox fi ;; - 'application/ogg') + 'application/ogg opus') + if [[ ${destinationformat[$destination]} = opus ]] \ + && checkCopy + then + copied=1 + else + decodeOpusdec + if (( ${destinationnormalize["$destination"]}))\ + || ( + [ -n "${destinationfrequency["$destination"]}" ]\ + && (( ${rate:-0} != ${destinationfrequency["$destination"]}))\ + ) || ( + [ -n "${destinationchannels["$destination"]}" ]\ + && (( ${channels:-0} != ${destinationchannels["$destination"]} )) + ) + then + sox_needed=1 + fi + fi + ;; + 'application/ogg'*) if [[ ${destinationformat[$destination]} = vorbis ]] \ && checkCopy then