* [pulseaudio] use thread safe collection
* [pulseaudio] source: connect pipe before store ref
* [pulseaudio] source: improve warning messages
* [pulseaudio] fix IOException when closing all sources
* [pulseaudio] prevent warning when InterruptedIOException on source close
Signed-off-by: Miguel Álvarez Díez <miguelwork92@gmail.com>
* Add default translations for binding add-ons
This makes the texts used by these add-ons translatable with Crowdin.
To keep the PR simple, it only adds default translations for add-ons which do not yet have any default translations properties file.
We can do follow up PRs for adding missing key/values to add-ons that already have these files or to remove duplications.
There are several add-ons in this PR that do have non-English translation files, so I'll upload those to Crowdin when the PR is merged.
Signed-off-by: Wouter Born <github@maindrain.net>
Add a pass to reencode PCM sound in 16 bit, 44100 hz, 2 channels, before sending it to the pulseaudio audio sink.
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* [pulseaudio] Fix sink-input configuration and other small improvements (#11272)
The binding requires a parameter to activate the parsing of sink-input entries on the pulseaudio server. This patch :
- document this behaviour
- fix the parsing of these parameters if a configuration file is used (the old method of casting launched a class cast exception)
Other small improvements :
- Force a refresh/new parsing when the configuration changes
- Fix scheduled disconnection : if a sound is played during the grace period, the scheduled disconnection is postponed, not added to the last
- add a possibility to never disconnect the audio sink (in order to have a lower latency when playing sound)
Closes#11272
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* Small fixes after proofreading
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
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>
* [pulseaudio] Add pulseaudio sink as openhab audio sink (#1895)
This add to the pulseaudio binding the capability to use "pulseaudio sink" as an "openhab sink" to output sound from openhab to a pulse audio server on the network.
You need to load module-simple-protocol-tcp sink in addition to the usual module-cli-protocol-tcp, and enable the sink in the thing configuration.
Closes#1895
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* Small corrections after review
And getting rid of some other compilation warnings
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* Fix some registration errors and allow the binding to load the simple module remotely
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* Small corrections after reviews
initialize audiosink in a thread with scheduler.submit
clear some warning related code.
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Better interruptexception handling
* Fix two small concurrency bugs
Signed-off-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
Co-authored-by: Gwendal Roulleau <gwendal.roulleau@gmail.com>
* Reworks many commons-lang usages to use standard Java
* Updates all remaining commons.lang imports to commons.lang3
Related to openhab/openhab-addons#7722
Signed-off-by: Wouter Born <github@maindrain.net>