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