output/wasapi: move the thread->Play() call right before the consumed_size check
Fixes a bogus assertion failure (which can now be removed).
This commit is contained in:
parent
14f0134097
commit
8024f7e84d
|
@ -633,8 +633,13 @@ WasapiOutput::Play(const void *chunk, size_t size)
|
|||
do {
|
||||
const size_t consumed_size = thread->spsc_buffer.push(
|
||||
static_cast<const BYTE *>(input.data), input.size);
|
||||
|
||||
if (!is_started) {
|
||||
is_started = true;
|
||||
thread->Play();
|
||||
}
|
||||
|
||||
if (consumed_size == 0) {
|
||||
assert(is_started);
|
||||
thread->Wait();
|
||||
thread->CheckException();
|
||||
if (!not_interrupted.test_and_set()) {
|
||||
|
@ -643,11 +648,6 @@ WasapiOutput::Play(const void *chunk, size_t size)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (!is_started) {
|
||||
is_started = true;
|
||||
thread->Play();
|
||||
}
|
||||
|
||||
thread->CheckException();
|
||||
|
||||
if (pcm_export) {
|
||||
|
|
Loading…
Reference in New Issue