Target formats can't handle 24bps

* read bit depth fron FLAC files
* downsample to 16
This commit is contained in:
Vincent Riquer 2013-09-09 01:16:27 +02:00
parent da4fe1c67a
commit cfc94d0a47
4 changed files with 13 additions and 1 deletions

4
atom
View File

@ -423,6 +423,7 @@ echo '
mime_type_actions.mime_text,
destinations.name,
destination_files.id,
tags.depth,
tags.rate,
tags.channels,
tags.bitrate,
@ -473,6 +474,8 @@ do
rest=${rest#*::AtOM:SQL:Sep::}
destfileid=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
bitdepth=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
rate=${rest%%::AtOM:SQL:Sep::*}
rest=${rest#*::AtOM:SQL:Sep::}
channels=${rest%%::AtOM:SQL:Sep::*}
@ -517,6 +520,7 @@ do
album \
albumartist \
artist \
bitdepth \
bitrate \
channels \
commandline \

View File

@ -26,6 +26,11 @@ decodeSox() {
commandline+=(-c ${destinationchannels["$destination"]})
soxoptions_out+=" -c ${destinationchannels["$destination"]}"
fi
if (( ${bitdepth:-0} > 16 ))
then
commandline+=(-b 16)
soxoptions_out+=" -b 16"
fi
tmpfile="$fileid${soxoptions_in// /}${soxoptions_out// /}"
commandline+=("$tempdir/$tmpfile.wav")
}

View File

@ -1,5 +1,5 @@
#!/bin/bash
getInfosFLAC_version='FLAC-1'
getInfosFLAC_version='FLAC-2'
tagreaders+=( "$getInfosFLAC_version" )
getInfos::FLAC() {
tagreader="$getInfosFLAC_version"
@ -36,10 +36,12 @@ getInfos::FLAC() {
{
read rate
read channels
read bitdepth
} < <(
metaflac \
--show-sample-rate \
--show-channels \
--show-bps \
"$sourcepath/$filename"
)
}

View File

@ -52,6 +52,7 @@ CREATE TABLE IF NOT EXISTS tags (
title TEXT,
composer TEXT,
performer TEXT,
depth INTEGER,
rate INTEGER,
channels INTEGER,
bitrate INTEGER,