aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/DecoderAPI.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-27 18:38:41 +0200
committerMax Kellermann <max@duempel.org>2014-08-27 18:48:43 +0200
commitba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45 (patch)
treeb5da178e2de8694c6354794631d3bc3906368442 /src/decoder/DecoderAPI.cxx
parent58e6f660f3ff0abc77eb879814188809e9bf1995 (diff)
downloadmpd-ba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45.tar.gz
mpd-ba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45.tar.xz
mpd-ba6ba7d4be6f43c5b6ba65a106fbf2ed40a53b45.zip
DecoderControl: use std::chrono::duration for Seek()
Diffstat (limited to '')
-rw-r--r--src/decoder/DecoderAPI.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/decoder/DecoderAPI.cxx b/src/decoder/DecoderAPI.cxx
index c9bdb46e8..939434f83 100644
--- a/src/decoder/DecoderAPI.cxx
+++ b/src/decoder/DecoderAPI.cxx
@@ -196,7 +196,7 @@ decoder_command_finished(Decoder &decoder)
dc.pipe->Clear(*dc.buffer);
- decoder.timestamp = dc.seek_where;
+ decoder.timestamp = dc.seek_time.ToDoubleS();
}
dc.command = DecoderCommand::NONE;
@@ -218,7 +218,7 @@ decoder_seek_time(Decoder &decoder)
decoder.seeking = true;
- return SongTime::FromS(dc.seek_where);
+ return dc.seek_time;
}
uint64_t
@@ -236,7 +236,7 @@ decoder_seek_where_frame(Decoder &decoder)
decoder.seeking = true;
- return uint64_t(dc.seek_where * dc.in_audio_format.sample_rate);
+ return dc.seek_time.ToScale<uint64_t>(dc.in_audio_format.sample_rate);
}
void decoder_seek_error(Decoder & decoder)