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

This commit is contained in:
Max Kellermann
2022-07-04 15:27:03 +02:00
parent d89136b09c
commit 4ce1dae673
58 changed files with 572 additions and 595 deletions

View File

@@ -511,9 +511,9 @@ DecoderBridge::SubmitData(InputStream *is,
assert(dc.in_audio_format != dc.out_audio_format);
try {
auto result = convert->Convert({data, length});
data = result.data;
length = result.size;
auto result = convert->Convert({(const std::byte *)data, length});
data = result.data();
length = result.size();
} catch (...) {
/* the PCM conversion has failed - stop
playback, since we have no better way to

View File

@@ -227,8 +227,7 @@ VorbisDecoder::SubmitSomePcm()
}
#else
PcmInterleaveFloat(buffer,
ConstBuffer<const in_sample_t *>(pcm,
channels),
{pcm, channels},
n_frames);
#endif