Skip to content

Commit 19994eb

Browse files
committed
aaudio: Requeue state update when stream locked.
1 parent 565c35c commit 19994eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cubeb_aaudio.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,10 +444,11 @@ update_state(cubeb_stream * stm)
444444
return;
445445
}
446446

447-
// If the main thread currently operates on this thread, we don't
448-
// have to wait for it
447+
// Requeue a state update if stream is already locked.
449448
unique_lock lock(stm->mutex, std::try_to_lock);
450449
if (!lock.owns_lock()) {
450+
stm->context->state.waiting.store(true);
451+
stm->context->state.cond.notify_one();
451452
return;
452453
}
453454

0 commit comments

Comments
 (0)