summaryrefslogtreecommitdiff
path: root/src/decoder/plugins/WavpackDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2018-07-05 19:07:05 +0200
committerMax Kellermann <max@musicpd.org>2018-07-05 19:07:05 +0200
commit3d3a1232b1d2b58d2cc05b2dd5c37f2256832693 (patch)
tree250933da4d5dc29145ce18e5a05a7f8da30396fd /src/decoder/plugins/WavpackDecoderPlugin.cxx
parent09d4176210d66cf9e2d258b563a7811892c560f4 (diff)
tag/Handler: convert to class with virtual methods
Diffstat (limited to 'src/decoder/plugins/WavpackDecoderPlugin.cxx')
-rw-r--r--src/decoder/plugins/WavpackDecoderPlugin.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx
index b444a7f80..d327f0280 100644
--- a/src/decoder/plugins/WavpackDecoderPlugin.cxx
+++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx
@@ -578,8 +578,7 @@ wavpack_filedecode(DecoderClient &client, Path path_fs)
* Reads metainfo from the specified file.
*/
static bool
-wavpack_scan_file(Path path_fs,
- const TagHandler &handler, void *handler_ctx) noexcept
+wavpack_scan_file(Path path_fs, TagHandler &handler) noexcept
{
WavpackContext *wpc;
@@ -595,14 +594,13 @@ wavpack_scan_file(Path path_fs,
const auto duration = GetDuration(wpc);
if (!duration.IsNegative())
- tag_handler_invoke_duration(handler, handler_ctx, SongTime(duration));
+ handler.OnDuration(SongTime(duration));
return true;
}
static bool
-wavpack_scan_stream(InputStream &is,
- const TagHandler &handler, void *handler_ctx) noexcept
+wavpack_scan_stream(InputStream &is, TagHandler &handler) noexcept
{
WavpackInput isp(nullptr, is);
@@ -620,7 +618,7 @@ wavpack_scan_stream(InputStream &is,
const auto duration = GetDuration(wpc);
if (!duration.IsNegative())
- tag_handler_invoke_duration(handler, handler_ctx, SongTime(duration));
+ handler.OnDuration(SongTime(duration));
return true;
}