]> git.basschouten.com Git - openhab-addons.git/commit
[pulseaudio] Fix playing time with pulseaudio sink (#11170) (#11171)
authordalgwen <dalgwen@users.noreply.github.com>
Wed, 8 Sep 2021 19:08:05 +0000 (21:08 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Sep 2021 19:08:05 +0000 (21:08 +0200)
commit0a96792a93e382a3f4daddb4d020916328dc6444
tree06ee65f2bc6977e3454e00995f2d2827b20da44a
parent56a0449ce1b758a6c53b2e05f93c30e0efe9d8a2
[pulseaudio] Fix playing time with pulseaudio sink (#11170) (#11171)

Fixes #11170 by introducing an intelligent thread.sleep (getting the duration of the sound, if possible, then wait the appropriate time for letting the sound play). By the way, the method to get the sound duration is not as easy as I thought.

Also fix a minor issue with the last volume not propertly saved.

And fix some minor warnings by using final local variable.

Signed-off-by: Gwendal ROULLEAU <gwendal.roulleau@gmail.com>
bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/PulseAudioAudioSink.java
bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java