Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
be8297d6
Commit
be8297d6
authored
Dec 09, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: basic DSD support (WavPack 5)
Enable OPEN_DSD_AS_PCM if available. No OPEN_DSD_NATIVE yet.
https://bugs.musicpd.org/view.php?id=4606
parent
09da80e9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
NEWS
NEWS
+1
-0
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+11
-3
No files found.
NEWS
View file @
be8297d6
...
...
@@ -27,6 +27,7 @@ ver 0.20 (not yet released)
- mpcdec: read the bit rate
- pcm: support audio/L16 (RFC 2586) and audio/x-mpd-float
- sidplay: faster scanning
- wavpack: support DSD (WavPack 5)
* playlist
- cue: don't skip pregap
- embcue: fix last track
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
be8297d6
...
...
@@ -41,6 +41,14 @@
static
constexpr
Domain
wavpack_domain
(
"wavpack"
);
#ifdef OPEN_DSD_AS_PCM
/* libWavPack supports DSD since version 5 */
static
constexpr
int
OPEN_DSD_FLAG
=
OPEN_DSD_AS_PCM
;
#else
/* no DSD support in this libWavPack version */
static
constexpr
int
OPEN_DSD_FLAG
=
0
;
#endif
/** A pointer type for format converter function. */
typedef
void
(
*
format_samples_t
)(
int
bytes_per_sample
,
...
...
@@ -204,7 +212,7 @@ wavpack_scan_file(Path path_fs,
{
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
WavpackOpenFileInput
(
path_fs
.
c_str
(),
error
,
0
,
0
);
OPEN_DSD_FLAG
,
0
);
if
(
wpc
==
nullptr
)
{
FormatError
(
wavpack_domain
,
"failed to open WavPack file
\"
%s
\"
: %s"
,
...
...
@@ -415,7 +423,7 @@ wavpack_open_wvc(DecoderClient &client, const char *uri)
static
void
wavpack_streamdecode
(
DecoderClient
&
client
,
InputStream
&
is
)
{
int
open_flags
=
OPEN_NORMALIZE
;
int
open_flags
=
OPEN_
DSD_FLAG
|
OPEN_
NORMALIZE
;
bool
can_seek
=
is
.
IsSeekable
();
std
::
unique_ptr
<
WavpackInput
>
wvc
;
...
...
@@ -459,7 +467,7 @@ wavpack_filedecode(DecoderClient &client, Path path_fs)
{
char
error
[
ERRORLEN
];
WavpackContext
*
wpc
=
WavpackOpenFileInput
(
path_fs
.
c_str
(),
error
,
OPEN_
WVC
|
OPEN_NORMALIZE
,
OPEN_
DSD_FLAG
|
OPEN_NORMALIZE
|
OPEN_WVC
,
0
);
if
(
wpc
==
nullptr
)
{
FormatWarning
(
wavpack_domain
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment