]> git.basschouten.com Git - openhab-addons.git/commitdiff
[pulseaudio] Fix source format options (#12913)
authorGiviMAD <GiviMAD@users.noreply.github.com>
Fri, 10 Jun 2022 05:39:01 +0000 (07:39 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Jun 2022 05:39:01 +0000 (07:39 +0200)
Signed-off-by: Miguel Álvarez <miguelwork92@gmail.com>
bundles/org.openhab.binding.pulseaudio/src/main/java/org/openhab/binding/pulseaudio/internal/handler/PulseaudioHandler.java
bundles/org.openhab.binding.pulseaudio/src/main/resources/OH-INF/thing/source.xml

index 676cbc1c8f938a185eb6554c563d3fea34dbe432..a4f48ef0d258928426bafda2ca62616db83a1f0c 100644 (file)
@@ -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);
index 147ec817e824e8e37fcf4a69633123f030913b00..411363eefb2378af388544ed31d3978e554993f5 100644 (file)
                                <default>s16le</default>
                                <advanced>true</advanced>
                                <options>
-                                       <option value="u8">PCM signed 8-bit</option>
+                                       <option value="u8">PCM unsigned 8-bit</option>
                                        <option value="s16le">PCM signed 16-bit little-endian</option>
                                        <option value="s16be">PCM signed 16-bit big-endian</option>
-                                       <option value="s24le">PCM unsigned 24-bit little-endian</option>
-                                       <option value="s24be">PCM unsigned 24-bit big-endian</option>
+                                       <option value="s24le">PCM signed 24-bit little-endian</option>
+                                       <option value="s24be">PCM signed 24-bit big-endian</option>
                                        <option value="s32le">PCM signed 32-bit little-endian</option>
                                        <option value="s32be">PCM signed 32-bit big-endian</option>
                                </options>