Closed elias-jhsph closed 7 months ago
Hello @elias-jhsph! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
sounddevice.py
:Line 379:80: E501 line too long (85 > 79 characters) Line 381:80: E501 line too long (92 > 79 characters) Line 382:80: E501 line too long (88 > 79 characters) Line 387:80: E501 line too long (90 > 79 characters) Line 395:80: E501 line too long (86 > 79 characters) Line 397:80: E501 line too long (107 > 79 characters) Line 398:80: E501 line too long (95 > 79 characters) Line 399:80: E501 line too long (119 > 79 characters) Line 2630:80: E501 line too long (88 > 79 characters) Line 2631:80: E501 line too long (91 > 79 characters) Line 2632:80: E501 line too long (92 > 79 characters) Line 2636:80: E501 line too long (83 > 79 characters) Line 2637:80: E501 line too long (102 > 79 characters) Line 2640:80: E501 line too long (81 > 79 characters)
The purpose of this pull request is to introduce a new feature to the
sounddevice
module'swait()
function. This update adds an optionaltimeout
parameter, allowing users to specify a maximum waiting time for audio playback or recording to finish.Key Highlights:
timeout
parameter to thewait()
function, enabling users to set a maximum wait time.sounddevice
module, particularly in scenarios where blocking the thread indefinitely is not viable.timeout
toNone
, which retains the original behavior of thewait()
function.Thank you for considering this contribution to the
sounddevice
module. I look forward to your feedback and the opportunity to improve this essential audio handling tool in Python.