decoder/*: use std::span instead of ConstBuffer

This commit is contained in:
Max Kellermann
2022-07-04 15:14:08 +02:00
parent 4ce1dae673
commit 9675cc77e2
9 changed files with 58 additions and 59 deletions

View File

@@ -27,10 +27,12 @@
#include "FlacInput.hxx"
#include "FlacPcm.hxx"
#include "../DecoderAPI.hxx"
#include "util/ConstBuffer.hxx"
#include <FLAC/stream_decoder.h>
#include <cstddef>
#include <span>
struct FlacDecoder : public FlacInput {
/**
* Has DecoderClient::Ready() been called yet?
@@ -63,7 +65,7 @@ struct FlacDecoder : public FlacInput {
* If this is non-empty, then DecoderBridge::SubmitData()
* should be called.
*/
ConstBuffer<void> chunk = nullptr;
std::span<const std::byte> chunk = {};
FlacDecoder(DecoderClient &_client, InputStream &_input_stream)
:FlacInput(_input_stream, &_client) {}