summaryrefslogtreecommitdiff
path: root/src/output
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2021-03-10 17:38:28 +0100
committerMax Kellermann <max@musicpd.org>2021-03-10 17:39:07 +0100
commit579428172e5411a4530244ce5c7c78eb1f8bb41c (patch)
treec3a8fca4454792ed7b01bd2cf9103b5a09436d8a /src/output
parent3e484637f90588707f928fc0a83f5c0836feeaca (diff)
output/wasapi: remove the broken Delay() calculation code
This code is complicated - and broken: the producer thread is not allowed to call consumer methods. Also the code is not necessary because this plugin implements Interrupt().
Diffstat (limited to 'src/output')
-rw-r--r--src/output/plugins/wasapi/WasapiOutputPlugin.cxx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
index f08b2fad4..a3501c94d 100644
--- a/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
+++ b/src/output/plugins/wasapi/WasapiOutputPlugin.cxx
@@ -601,15 +601,7 @@ WasapiOutput::Delay() const noexcept
return std::chrono::seconds(1);
}
- assert(thread);
-
- const size_t data_size = thread->spsc_buffer.read_available();
- const size_t delay_size = std::max(data_size, watermark) - watermark;
-
- using s = std::chrono::seconds;
- using duration = std::chrono::steady_clock::duration;
- auto result = duration(s(delay_size)) / device_format.Format.nAvgBytesPerSec;
- return result;
+ return std::chrono::steady_clock::duration::zero();
}
size_t