diff options
author | Max Kellermann <max@musicpd.org> | 2018-07-05 19:07:05 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2018-07-05 19:07:05 +0200 |
commit | 3d3a1232b1d2b58d2cc05b2dd5c37f2256832693 (patch) | |
tree | 250933da4d5dc29145ce18e5a05a7f8da30396fd /src/decoder/plugins/WavpackDecoderPlugin.cxx | |
parent | 09d4176210d66cf9e2d258b563a7811892c560f4 (diff) |
tag/Handler: convert to class with virtual methods
Diffstat (limited to 'src/decoder/plugins/WavpackDecoderPlugin.cxx')
-rw-r--r-- | src/decoder/plugins/WavpackDecoderPlugin.cxx | 10 |
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; } |