Merge branch 'v0.22.x'

This commit is contained in:
Max Kellermann
2021-03-05 16:05:56 +01:00
13 changed files with 142 additions and 74 deletions

View File

@@ -155,7 +155,7 @@ public:
void Finish() noexcept { return SetStatus(Status::FINISH); }
void Play() noexcept { return SetStatus(Status::PLAY); }
void Pause() noexcept { return SetStatus(Status::PAUSE); }
void WaitDataPoped() noexcept { data_poped.Wait(INFINITE); }
void WaitDataPoped() noexcept { data_poped.Wait(); }
void CheckException() {
if (error.occur.load()) {
auto err = std::exchange(error.ptr, nullptr);
@@ -269,7 +269,7 @@ void WasapiOutputThread::Work() noexcept {
COM com{true};
while (true) {
try {
event.Wait(INFINITE);
event.Wait();
Status current_state = status.load();
if (current_state == Status::FINISH) {
@@ -322,7 +322,7 @@ void WasapiOutputThread::Work() noexcept {
} catch (...) {
error.ptr = std::current_exception();
error.occur.store(true);
error.thrown.Wait(INFINITE);
error.thrown.Wait();
}
}
}

View File

@@ -159,6 +159,7 @@ if is_windows
wasapi_dep = [
c_compiler.find_library('ksuser', required: true),
c_compiler.find_library('ole32', required: true),
win32_dep,
]
else
wasapi_dep = dependency('', required: false)