lib/cdio: use std::span instead of ConstBuffer
This commit is contained in:
parent
b9c9a5f1dd
commit
8fa212f04d
@ -298,7 +298,7 @@ CdioParanoiaInputStream::Read(std::unique_lock<Mutex> &,
|
||||
const ScopeUnlock unlock(mutex);
|
||||
|
||||
try {
|
||||
rbuf = para.Read().data;
|
||||
rbuf = para.Read().data();
|
||||
} catch (...) {
|
||||
char *s_err = cdio_cddap_errors(drv);
|
||||
if (s_err) {
|
||||
|
@ -30,11 +30,10 @@
|
||||
#ifndef CDIO_PARANOIA_HXX
|
||||
#define CDIO_PARANOIA_HXX
|
||||
|
||||
#include "util/ConstBuffer.hxx"
|
||||
|
||||
#include <cdio/version.h>
|
||||
#include <cdio/paranoia/paranoia.h>
|
||||
|
||||
#include <span>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
@ -149,7 +148,7 @@ public:
|
||||
throw std::runtime_error("Failed to seek disc");
|
||||
}
|
||||
|
||||
ConstBuffer<int16_t> Read() {
|
||||
std::span<const int16_t> Read() {
|
||||
const int16_t *data = cdio_paranoia_read(paranoia, nullptr);
|
||||
if (data == nullptr)
|
||||
throw std::runtime_error("Read from audio CD failed");
|
||||
|
Loading…
Reference in New Issue
Block a user