decoder/Client: pass std::span to SubmitData()

This commit is contained in:
Max Kellermann
2022-07-11 18:03:06 +02:00
parent 329c448d30
commit c34f6ed8c0
30 changed files with 138 additions and 116 deletions

View File

@@ -187,7 +187,7 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
auto r = buffer.Read();
/* round down to the nearest frame size, because we
must not pass partial frames to
DecoderClient::SubmitData() */
DecoderClient::SubmitAudio() */
r = r.first(r.size() - r.size() % in_frame_size);
buffer.Consume(r.size());
@@ -209,7 +209,7 @@ pcm_stream_decode(DecoderClient &client, InputStream &is)
}
cmd = !r.empty()
? client.SubmitData(is, r.data(), r.size(), 0)
? client.SubmitAudio(is, r, 0)
: client.GetCommand();
if (cmd == DecoderCommand::SEEK) {
uint64_t frame = client.GetSeekFrame();