[PATCH v6 18/37] raop: Prefer ALAC encoding to raw PCM if supported by server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Martin Blanchard <tchaik@xxxxxxx>

ALAC encoding is to be prefered simply because ALAC audio packet reverse-
engineering and implementation is in better shape than raw PCM. Sending ALAC
audio does not mean compressing audio and thus linking an external library to
do so. ALAC packets has the ability to carry uncompressed PCM frames, and
that's what is implemented at the time.
---
 src/modules/raop/module-raop-discover.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/modules/raop/module-raop-discover.c b/src/modules/raop/module-raop-discover.c
index f174da3..00065aa 100644
--- a/src/modules/raop/module-raop-discover.c
+++ b/src/modules/raop/module-raop-discover.c
@@ -198,7 +198,10 @@ static void resolver_cb(
              *  - 1 = ALAC,
              *  - 2 = AAC,
              *  - 3 = AAC ELD. */
-            cn = strdup("PCM");
+            if (pa_str_in_list(value, ",", "1"))
+                cn = strdup("ALAC");
+            else
+                cn = strdup("PCM");
         } else if (pa_streq(key, "md")) {
             /* Supported metadata types:
              *  - 0 = text,
-- 
2.5.0



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux