diff options
author | Chris Robinson <[email protected]> | 2023-01-09 03:50:02 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-01-09 03:50:02 -0800 |
commit | 89c09f66acc4562ec0be1bf6e51c64209799ab29 (patch) | |
tree | 72842c308cb68cee212d2b3af7d4d9009bdfca40 /alc/backends/pipewire.cpp | |
parent | 04fc1676db08e05e964645feb5d2696bcd175251 (diff) |
Don't rely on mRateMatch while waiting for PipeWire timing info
Diffstat (limited to 'alc/backends/pipewire.cpp')
-rw-r--r-- | alc/backends/pipewire.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/alc/backends/pipewire.cpp b/alc/backends/pipewire.cpp index f60629de..aa3ae459 100644 --- a/alc/backends/pipewire.cpp +++ b/alc/backends/pipewire.cpp @@ -1609,9 +1609,7 @@ void PipeWirePlayback::start() * is (up to about 2 seconds). */ int wait_count{100}; - pw_stream_state state{PW_STREAM_STATE_STREAMING}; - while(state == PW_STREAM_STATE_STREAMING && mRateMatch) - { + do { pw_time ptime{}; if(int res{pw_stream_get_time_n(mStream.get(), &ptime, sizeof(ptime))}) { @@ -1659,8 +1657,7 @@ void PipeWirePlayback::start() plock.unlock(); std::this_thread::sleep_for(milliseconds{20}); plock.lock(); - state = pw_stream_get_state(mStream.get(), nullptr); - } + } while(pw_stream_get_state(mStream.get(), nullptr) == PW_STREAM_STATE_STREAMING); } void PipeWirePlayback::stop() |