diff options
author | Max Kellermann <max@musicpd.org> | 2016-12-10 00:11:04 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2016-12-10 00:12:47 +0100 |
commit | 0525a6f90f9ef5e1c16255b58c9c63c70914b1f3 (patch) | |
tree | 80728e7484b139185459dde159858f0893cf7b32 /src/decoder | |
parent | 7b4305d81bf29f89c232a0aba4d61817912430d8 (diff) |
decoder/wavpack: use WavpackSeekSample64() if available
Diffstat (limited to 'src/decoder')
-rw-r--r-- | src/decoder/plugins/WavpackDecoderPlugin.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/decoder/plugins/WavpackDecoderPlugin.cxx b/src/decoder/plugins/WavpackDecoderPlugin.cxx index 138556ea9..9797b2aff 100644 --- a/src/decoder/plugins/WavpackDecoderPlugin.cxx +++ b/src/decoder/plugins/WavpackDecoderPlugin.cxx @@ -217,7 +217,12 @@ wavpack_decode(DecoderClient &client, WavpackContext *wpc, bool can_seek) if (cmd == DecoderCommand::SEEK) { if (can_seek) { auto where = client.GetSeekFrame(); - if (!WavpackSeekSample(wpc, where)) { +#ifdef OPEN_DSD_AS_PCM + bool success = WavpackSeekSample64(wpc, where); +#else + bool success = WavpackSeekSample(wpc, where); +#endif + if (!success) { /* seek errors are fatal */ client.SeekError(); break; |