Skip to content

Commit

Permalink
Add support for DSD WavPack
Browse files Browse the repository at this point in the history
From version 5.0 WavPack supports DSD-encoded WavPacks. To play these files use the DSDPlayer plugin.

Patch authored by Kimmo Taskinen
  • Loading branch information
terual committed Sep 27, 2020
1 parent 21270bc commit 9de0763
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 11 deletions.
8 changes: 8 additions & 0 deletions Slim/Formats.pm
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ sub init {
$tagClasses{'dsf'} = 'Slim::Formats::DSF';
}

if (Slim::Utils::Versions->compareVersions($Audio::Scan::VERSION,'0.99') >= 0) {
$tagClasses{'wvpx'} = 'Slim::Formats::WavPack';
}

if (Slim::Utils::Versions->compareVersions($Audio::Scan::VERSION, '1.02') >= 0) {
$tagClasses{'ops'} = 'Slim::Formats::OggOpus';
}
Expand Down Expand Up @@ -261,6 +265,10 @@ sub readTags {
$tags->{'CONTENT_TYPE'} = 'alcx' if ($tags->{'CONTENT_TYPE'} eq 'alc')
}

if ($tags->{'WAVPACKDSD'}) {
$type = 'wvpx';
}

# Only set if we couldn't read it from the file.
$tags->{'CONTENT_TYPE'} ||= $type;

Expand Down
4 changes: 4 additions & 0 deletions Slim/Formats/WavPack.pm
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ sub getTag {
$tags->{CHANNELS} = $info->{channels};
$tags->{VBR_SCALE} = 1;

if ( $info->{bits_per_sample} == 1 ) {
$tags->{WAVPACKDSD} = 1;
}

Slim::Formats::APE->doTagMapping($tags);

return $tags;
Expand Down
4 changes: 4 additions & 0 deletions convert.conf
Original file line number Diff line number Diff line change
Expand Up @@ -373,3 +373,7 @@ dsf dsf * *
dff dff * *
# IFD
-

wvpx wvpx * *
# IFD
-
37 changes: 26 additions & 11 deletions strings.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11766,20 +11766,35 @@ MPC
SV Musepack

WVP
CS Wavpack
DA Wavpack
DE Wavpack
EN Wavpack
ES Wavpack
CS WavPack
DA WavPack
DE WavPack
EN WavPack
ES WavPack
FI WavPack
FR Wavpack
IT Wavpack
NL Wavpack
NO Wavpack
PL Wavpack
RU Wavpack
FR WavPack
IT WavPack
NL WavPack
NO WavPack
PL WavPack
RU WavPack
SV WavPack

WVPX
CS WavPack DSD
DA WavPack DSD
DE WavPack DSD
EN WavPack DSD
ES WavPack DSD
FI WavPack DSD
FR WavPack DSD
IT WavPack DSD
NL WavPack DSD
NO WavPack DSD
PL WavPack DSD
RU WavPack DSD
SV WavPack DSD

SHN
# SLT: Please note that "Shorten" is a file format name, thus doesn't need to be translated
EN Shorten
Expand Down
1 change: 1 addition & 0 deletions types.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ wmal - audio/x-wma-lossless audio
wmap - audio/x-wma-wmapro audio
wpl wpl application/vnd.ms-wpl playlist
wvp wv audio/x-wavpack audio
wvpx - audio/x-wavpack audio
xml xml,xsl text/xml -
xpf xspf application/xspf+xml playlist
xul xul application/vnd.mozilla.xul+xml -
Expand Down

0 comments on commit 9de0763

Please sign in to comment.