output/{alsa,osx}: use ConstBuffer::empty()
This commit is contained in:
parent
8444c33514
commit
e8044663b3
@ -939,7 +939,7 @@ AlsaOutput::Play(const void *chunk, size_t size)
|
|||||||
assert(size % in_frame_size == 0);
|
assert(size % in_frame_size == 0);
|
||||||
|
|
||||||
const auto e = pcm_export->Export({chunk, size});
|
const auto e = pcm_export->Export({chunk, size});
|
||||||
if (e.size == 0)
|
if (e.empty())
|
||||||
/* the DoP (DSD over PCM) filter converts two frames
|
/* the DoP (DSD over PCM) filter converts two frames
|
||||||
at a time and ignores the last odd frame; if there
|
at a time and ignores the last odd frame; if there
|
||||||
was only one frame (e.g. the last frame in the
|
was only one frame (e.g. the last frame in the
|
||||||
|
@ -921,7 +921,7 @@ OSXOutput::Play(const void *chunk, size_t size)
|
|||||||
file), the result is empty; to avoid an endless
|
file), the result is empty; to avoid an endless
|
||||||
loop, bail out here, and pretend the one frame has
|
loop, bail out here, and pretend the one frame has
|
||||||
been played */
|
been played */
|
||||||
if (e.size == 0)
|
if (e.empty())
|
||||||
return size;
|
return size;
|
||||||
|
|
||||||
size_t bytes_written = ring_buffer->push((const uint8_t *)e.data, e.size);
|
size_t bytes_written = ring_buffer->push((const uint8_t *)e.data, e.size);
|
||||||
|
Loading…
Reference in New Issue
Block a user