decoder/wavpack: use WavpackSeekSample64() if available

This commit is contained in:
Max Kellermann 2016-12-10 00:11:04 +01:00
parent 7b4305d81b
commit 0525a6f90f

View File

@ -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;