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);
|
const ScopeUnlock unlock(mutex);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
rbuf = para.Read().data;
|
rbuf = para.Read().data();
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
char *s_err = cdio_cddap_errors(drv);
|
char *s_err = cdio_cddap_errors(drv);
|
||||||
if (s_err) {
|
if (s_err) {
|
||||||
|
@ -30,11 +30,10 @@
|
|||||||
#ifndef CDIO_PARANOIA_HXX
|
#ifndef CDIO_PARANOIA_HXX
|
||||||
#define CDIO_PARANOIA_HXX
|
#define CDIO_PARANOIA_HXX
|
||||||
|
|
||||||
#include "util/ConstBuffer.hxx"
|
|
||||||
|
|
||||||
#include <cdio/version.h>
|
#include <cdio/version.h>
|
||||||
#include <cdio/paranoia/paranoia.h>
|
#include <cdio/paranoia/paranoia.h>
|
||||||
|
|
||||||
|
#include <span>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
@ -149,7 +148,7 @@ public:
|
|||||||
throw std::runtime_error("Failed to seek disc");
|
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);
|
const int16_t *data = cdio_paranoia_read(paranoia, nullptr);
|
||||||
if (data == nullptr)
|
if (data == nullptr)
|
||||||
throw std::runtime_error("Read from audio CD failed");
|
throw std::runtime_error("Read from audio CD failed");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user