summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-03-08 22:43:38 +0100
committerMax Kellermann <max@musicpd.org>2021-03-08 22:44:49 +0100
commit9ade93983c61f90afa89aedf7119a17df3cbe1ba (patch)
tree15e2c3f1fe9c040d4d62f65fa2c76e301740df32 /src/output
parent6931ce9558854abd4bb70f61f3f465896f0a87b0 (diff)
output/wasapi: rename method WaitDataPoped() to Wait()
Diffstat (limited to 'src/output')
-rw-r--r--src/output/plugins/wasapi/WasapiOutputPlugin.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
index dc9f27107..e08a4d985 100644
--- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
@@ -198,7 +198,15 @@ public:
void Play() noexcept { return SetStatus(Status::PLAY); }
void Pause() noexcept { return SetStatus(Status::PAUSE); }
- void WaitDataPoped() noexcept { data_poped.Wait(); }
+
+ /**
+ * Wait for the thread to finish some work (e.g. until some
+ * buffer space becomes available).
+ */
+ void Wait() noexcept {
+ data_poped.Wait();
+ }
+
void CheckException() {
if (error.occur.load()) {
std::rethrow_exception(error.ptr);
@@ -600,7 +608,7 @@ WasapiOutput::Play(const void *chunk, size_t size)
static_cast<const BYTE *>(input.data), input.size);
if (consumed_size == 0) {
assert(is_started);
- thread->WaitDataPoped();
+ thread->Wait();
if (!not_interrupted.test_and_set()) {
throw AudioOutputInterrupted{};
}