decode opus

This commit is contained in:
Vincent Riquer 2013-04-05 01:53:01 +02:00
parent eed0d035f2
commit 6297dd6af7

27
atom
View File

@ -1081,6 +1081,11 @@ decodeMpcdec() {
commandline=(mpcdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav") commandline=(mpcdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav")
} }
decodeOpusdec() {
tmpfile="${fileid}opusdec"
commandline=(opusdec "$sourcepath/$filename" "$tempdir/$tmpfile.wav")
}
decodeFile() { decodeFile() {
if ! decodetaskid=$( if ! decodetaskid=$(
Select tasks id <<<"key = $tmpfile" Select tasks id <<<"key = $tmpfile"
@ -2036,7 +2041,27 @@ do
decodeSox decodeSox
fi 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 ]] \ if [[ ${destinationformat[$destination]} = vorbis ]] \
&& checkCopy && checkCopy
then then