Increase sleep time before killing recording to resolve macOS test failures. (#917)

* Increase sleep time before killing recording to resolve macOS test failures.

* Add PR #917 to changelog.
ms-thread-leak-fx
Mooneer Salem 2025-06-05 12:58:05 -07:00 committed by GitHub
parent a2291b42dd
commit 38b20a9e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -797,6 +797,7 @@ LDPC | Low Density Parity Check Codes - a family of powerful FEC codes
* Reduce usage of non-real time safe code. (PR #900)
* FreeDV Reporter: Force explicit background color (avoids unwanted mouseover highlights on Linux). (PR #911)
* Fix compiler errors when using wxWidgets 3.0. (PR #914)
* Unit tests: Increase sleep time before killing recording to resolve macOS test failures. (PR #917)
## V2.0.0 June 2025

View File

@ -322,9 +322,11 @@ class HamlibHandler:
self.ErrParam()
else:
if (not x) and self.app.ptt:
# Sleep for 20ms to match typical SDR behavior + 5ms to account for varying system load.
# Example: Flex 6000/8000 (https://community.flexradio.com/discussion/8028104/question-regarding-tx-delay)
time.sleep(25 / 1000)
# Sleep for 20ms to match typical SDR behavior + 30ms to account for varying system load/virtual audio latency.
# References:
# Virtual audio latency: https://vb-audio.com/Cable/VBCABLE_ReferenceManual.pdf (assuming 10ms/512 sample buffer size @ 48 kHz)
# Example TX->RX switching time: Flex 6000/8000 (https://community.flexradio.com/discussion/8028104/question-regarding-tx-delay)
time.sleep(50 / 1000)
os.kill(self.pid, signal.SIGTERM)
if x:
self.app.ptt = 1