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
30bd190b
Commit
30bd190b
authored
Dec 09, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/wavpack: implement scan_stream()
parent
cf93cd93
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
NEWS
NEWS
+1
-0
WavpackDecoderPlugin.cxx
src/decoder/plugins/WavpackDecoderPlugin.cxx
+19
-1
No files found.
NEWS
View file @
30bd190b
...
@@ -28,6 +28,7 @@ ver 0.20 (not yet released)
...
@@ -28,6 +28,7 @@ ver 0.20 (not yet released)
- pcm: support audio/L16 (RFC 2586) and audio/x-mpd-float
- pcm: support audio/L16 (RFC 2586) and audio/x-mpd-float
- sidplay: faster scanning
- sidplay: faster scanning
- wavpack: support DSD (WavPack 5)
- wavpack: support DSD (WavPack 5)
- wavpack: archive support
* playlist
* playlist
- cue: don't skip pregap
- cue: don't skip pregap
- embcue: fix last track
- embcue: fix last track
...
...
src/decoder/plugins/WavpackDecoderPlugin.cxx
View file @
30bd190b
...
@@ -496,6 +496,24 @@ wavpack_scan_file(Path path_fs,
...
@@ -496,6 +496,24 @@ wavpack_scan_file(Path path_fs,
return
true
;
return
true
;
}
}
static
bool
wavpack_scan_stream
(
InputStream
&
is
,
const
TagHandler
&
handler
,
void
*
handler_ctx
)
{
WavpackInput
isp
(
nullptr
,
is
);
auto
*
wpc
=
WavpackOpenInput
(
&
mpd_is_reader
,
&
isp
,
nullptr
,
OPEN_DSD_FLAG
,
0
);
AtScopeExit
(
wpc
)
{
WavpackCloseFile
(
wpc
);
};
const
auto
duration
=
GetDuration
(
wpc
);
if
(
!
duration
.
IsNegative
())
tag_handler_invoke_duration
(
handler
,
handler_ctx
,
SongTime
(
duration
));
return
true
;
}
static
char
const
*
const
wavpack_suffixes
[]
=
{
static
char
const
*
const
wavpack_suffixes
[]
=
{
"wv"
,
"wv"
,
nullptr
nullptr
...
@@ -513,7 +531,7 @@ const struct DecoderPlugin wavpack_decoder_plugin = {
...
@@ -513,7 +531,7 @@ const struct DecoderPlugin wavpack_decoder_plugin = {
wavpack_streamdecode
,
wavpack_streamdecode
,
wavpack_filedecode
,
wavpack_filedecode
,
wavpack_scan_file
,
wavpack_scan_file
,
nullptr
,
wavpack_scan_stream
,
nullptr
,
nullptr
,
wavpack_suffixes
,
wavpack_suffixes
,
wavpack_mime_types
wavpack_mime_types
...
...
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