output/wasapi: remove the "thrown" field
It is pointless to let WasapiOutputThread wait for the CheckException() call.
This commit is contained in:
parent
9256190a9b
commit
79397db5b4
|
@ -173,7 +173,6 @@ class WasapiOutputThread : public Thread {
|
||||||
alignas(BOOST_LOCKFREE_CACHELINE_BYTES) struct {
|
alignas(BOOST_LOCKFREE_CACHELINE_BYTES) struct {
|
||||||
std::atomic_bool occur = false;
|
std::atomic_bool occur = false;
|
||||||
std::exception_ptr ptr = nullptr;
|
std::exception_ptr ptr = nullptr;
|
||||||
WinEvent thrown;
|
|
||||||
} error;
|
} error;
|
||||||
boost::lockfree::spsc_queue<BYTE> spsc_buffer;
|
boost::lockfree::spsc_queue<BYTE> spsc_buffer;
|
||||||
|
|
||||||
|
@ -197,7 +196,6 @@ public:
|
||||||
void CheckException() {
|
void CheckException() {
|
||||||
if (error.occur.load()) {
|
if (error.occur.load()) {
|
||||||
auto err = std::exchange(error.ptr, nullptr);
|
auto err = std::exchange(error.ptr, nullptr);
|
||||||
error.thrown.Set();
|
|
||||||
std::rethrow_exception(err);
|
std::rethrow_exception(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -371,7 +369,6 @@ try {
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
error.ptr = std::current_exception();
|
error.ptr = std::current_exception();
|
||||||
error.occur.store(true);
|
error.occur.store(true);
|
||||||
error.thrown.Wait();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioOutput *
|
AudioOutput *
|
||||||
|
|
Loading…
Reference in New Issue