From 798d59b2c572d1f70d0a7f9c5d566193e48a2f94 Mon Sep 17 00:00:00 2001 From: GiviMAD Date: Fri, 10 Jun 2022 07:39:01 +0200 Subject: [PATCH] [pulseaudio] Fix source format options (#12913) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Miguel Álvarez --- .../pulseaudio/internal/handler/PulseaudioHandler.java | 10 +++++----- .../src/main/resources/OH-INF/thing/source.xml | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java b/bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java index 676cbc1c8..a4f48ef0d 100644 --- a/bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java +++ b/bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java @@ -482,7 +482,7 @@ public class PulseaudioHandler extends BaseThingHandler { } switch (simpleFormat) { case "u8": - return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, null, 8, 1, + return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_UNSIGNED, null, 8, 1, simpleRate.longValue(), simpleChannels.intValue()); case "s16le": return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, false, 16, 1, @@ -491,16 +491,16 @@ public class PulseaudioHandler extends BaseThingHandler { return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, true, 16, 1, simpleRate.longValue(), simpleChannels.intValue()); case "s24le": - return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_UNSIGNED, false, 24, 1, + return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, false, 24, 1, simpleRate.longValue(), simpleChannels.intValue()); case "s24be": - return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_UNSIGNED, true, 24, 1, + return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, true, 24, 1, simpleRate.longValue(), simpleChannels.intValue()); case "s32le": - return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_UNSIGNED, false, 32, 1, + return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, false, 32, 1, simpleRate.longValue(), simpleChannels.intValue()); case "s32be": - return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_UNSIGNED, true, 32, 1, + return new AudioFormat(AudioFormat.CONTAINER_WAVE, AudioFormat.CODEC_PCM_SIGNED, true, 32, 1, simpleRate.longValue(), simpleChannels.intValue()); default: logger.warn("unsupported format {}", simpleFormat); diff --git a/bundles/org.openhab.binding.pulseaudio/src/main/resources/OH-INF/thing/source.xml b/bundles/org.openhab.binding.pulseaudio/src/main/resources/OH-INF/thing/source.xml index 147ec817e..411363eef 100644 --- a/bundles/org.openhab.binding.pulseaudio/src/main/resources/OH-INF/thing/source.xml +++ b/bundles/org.openhab.binding.pulseaudio/src/main/resources/OH-INF/thing/source.xml @@ -54,11 +54,11 @@ s16le true - + - - + +