DecoderControl: use std::chrono::duration for Seek()

This commit is contained in:
Max Kellermann
2014-08-27 18:38:41 +02:00
parent 58e6f660f3
commit ba6ba7d4be
5 changed files with 10 additions and 10 deletions

View File

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