From ffadc399af6f04289f4bbadf845435244d6be934 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sun, 3 Jan 2021 23:51:35 +0100 Subject: [PATCH] [cfg] Add option for prefering AirPlay 2 (useful for testing) --- configure.ac | 3 +++ src/outputs/airplay.c | 6 +++++- src/outputs/raop.c | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 99392d1a..7787b43c 100644 --- a/configure.ac +++ b/configure.ac @@ -322,6 +322,9 @@ FORK_ARG_ENABLE([Chromecast support], [chromecast], [CHROMECAST], AM_CONDITIONAL([COND_CHROMECAST], [[test "x$enable_chromecast" = "xyes"]]) AM_CONDITIONAL([COND_PROTOBUF_OLD], [[test "x$protobuf_old" = "xyes"]]) +dnl Prefer AirPlay 2 +FORK_ARG_ENABLE([preference for AirPlay 2 for devices that support both 1 and 2], [preferairplay2], [PREFER_AIRPLAY2]) + dnl DB profiling support FORK_ARG_ENABLE([DB profiling support], [dbprofile], [DB_PROFILE]) diff --git a/src/outputs/airplay.c b/src/outputs/airplay.c index 238b3e9f..4f436fa0 100644 --- a/src/outputs/airplay.c +++ b/src/outputs/airplay.c @@ -4413,7 +4413,11 @@ struct output_definition output_airplay = { .name = "AirPlay 2", .type = OUTPUT_TYPE_AIRPLAY, - .priority = 2, // AirPlay 1 has priority for the time being +#ifdef PREFER_AIRPLAY2 + .priority = 1, +#else + .priority = 2, +#endif .disabled = 0, .init = airplay_init, .deinit = airplay_deinit, diff --git a/src/outputs/raop.c b/src/outputs/raop.c index a50fbc3e..60bc82d3 100644 --- a/src/outputs/raop.c +++ b/src/outputs/raop.c @@ -4954,7 +4954,11 @@ struct output_definition output_raop = { .name = "AirPlay", .type = OUTPUT_TYPE_RAOP, +#ifdef PREFER_AIRPLAY2 + .priority = 2, +#else .priority = 1, +#endif .disabled = 0, .init = raop_init, .deinit = raop_deinit,