diff --git a/atom b/atom index 3e42f01..df88835 100755 --- a/atom +++ b/atom @@ -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 \ diff --git a/lib/decode/sox b/lib/decode/sox index 5d7e6df..ef4c7f6 100644 --- a/lib/decode/sox +++ b/lib/decode/sox @@ -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") } diff --git a/lib/tags/flac b/lib/tags/flac index 288eac7..32d3f4a 100644 --- a/lib/tags/flac +++ b/lib/tags/flac @@ -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" ) } diff --git a/share/schema.sql b/share/schema.sql index 1859f55..9de9a43 100644 --- a/share/schema.sql +++ b/share/schema.sql @@ -52,6 +52,7 @@ CREATE TABLE IF NOT EXISTS tags ( title TEXT, composer TEXT, performer TEXT, + depth INTEGER, rate INTEGER, channels INTEGER, bitrate INTEGER,