Support for nex flac and ogg mime-type: decode

This commit is contained in:
Vincent Riquer 2025-01-20 19:43:26 +01:00
parent 82f1648a4d
commit 04bda0178c

View File

@ -51,6 +51,27 @@ decodeFile() {
fi fi
fi fi
;; ;;
'audio/ogg opus')
if [[ ${destinationformat[$destination]} = opus ]] \
&& checkCopy
then
copied=1
else
(( disableopusdec )) && continue
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'*) 'application/ogg'*)
if [[ ${destinationformat[$destination]} = vorbis ]] \ if [[ ${destinationformat[$destination]} = vorbis ]] \
&& checkCopy && checkCopy
@ -60,9 +81,21 @@ decodeFile() {
decodeSox decodeSox
fi fi
;; ;;
'audio/ogg'*)
if [[ ${destinationformat[$destination]} = vorbis ]] \
&& checkCopy
then
copied=1
else
decodeSox
fi
;;
'audio/x-flac') 'audio/x-flac')
decodeSox decodeSox
;; ;;
'audio/flac')
decodeSox
;;
*) *)
extendedtype=$(file -b "$sourcepath/$filename") extendedtype=$(file -b "$sourcepath/$filename")
case "$extendedtype" in case "$extendedtype" in