From e8044663b315e466bbc98abe56719564dfbba9ad Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 17 Jun 2019 22:09:47 +0200 Subject: [PATCH] output/{alsa,osx}: use ConstBuffer::empty() --- src/output/plugins/AlsaOutputPlugin.cxx | 2 +- src/output/plugins/OSXOutputPlugin.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/output/plugins/AlsaOutputPlugin.cxx b/src/output/plugins/AlsaOutputPlugin.cxx index 214abd45e..7f2007024 100644 --- a/src/output/plugins/AlsaOutputPlugin.cxx +++ b/src/output/plugins/AlsaOutputPlugin.cxx @@ -939,7 +939,7 @@ AlsaOutput::Play(const void *chunk, size_t size) assert(size % in_frame_size == 0); const auto e = pcm_export->Export({chunk, size}); - if (e.size == 0) + if (e.empty()) /* the DoP (DSD over PCM) filter converts two frames at a time and ignores the last odd frame; if there was only one frame (e.g. the last frame in the diff --git a/src/output/plugins/OSXOutputPlugin.cxx b/src/output/plugins/OSXOutputPlugin.cxx index c283c9050..fb1cc380d 100644 --- a/src/output/plugins/OSXOutputPlugin.cxx +++ b/src/output/plugins/OSXOutputPlugin.cxx @@ -921,7 +921,7 @@ OSXOutput::Play(const void *chunk, size_t size) file), the result is empty; to avoid an endless loop, bail out here, and pretend the one frame has been played */ - if (e.size == 0) + if (e.empty()) return size; size_t bytes_written = ring_buffer->push((const uint8_t *)e.data, e.size);