bendavid / aiopylgtv

Library to control webOS based LG Tv devices
MIT License
145 stars 47 forks source link

Consecutive volume steps delay #17

Closed jthure closed 3 years ago

jthure commented 4 years ago

Fixes issue #16

Sound output external_arc doesn't process multiple volume steps sent immediately after each other.

This PR changes so that if sound output is external_arc, the volume step call sleeps on a lock after the volume step has been requested. This ensures that the next volume step won't be requested until the previous has woken and released the lock

bendavid commented 4 years ago

The delay should be configurable, since different external devices may behave differently.

jthure commented 4 years ago

The delay should be configurable, since different external devices may behave differently.

@bendavid Ready for review again

jthure commented 4 years ago

Hey @bendavid , have you had a chance to look at this PR?

jthure commented 3 years ago

Hey @bendavid, pinging about this PR again

bendavid commented 3 years ago

Sorry for the delay. Can you make the configuration such that it is possible to disable the delay entirely (and make this the default) e.g. with negative values or None?

Also see inline comment about the lock usage.

jthure commented 3 years ago

Sorry for the delay. Can you make the configuration such that it is possible to disable the delay entirely (and make this the default) e.g. with negative values or None?

Also see inline comment about the lock usage.

No worries! I've made the changes. Now there's no delay by default and the lock is not acquired if it is not needed.