diff --git a/README.html b/README.html
index d588998..ca77351 100644
--- a/README.html
+++ b/README.html
@@ -400,11 +400,6 @@ from sources like Apple Music in Audio-Only (ALAC) mode: run
a image viewer with an autoreload feature: an example is “feh”: run
“feh -R 1 <name>” in the foreground; terminate feh
and then Uxplay with “ctrl-C fg ctrl-C”.
-In Audio-Only mode the server needs to specify a latency to the
-client so the client can show video in sync with audio played on the
-server. The default is 0.25 seconds: this can be changed with the
--ao x.y option, where x.y is a decimal like 0.25 in the
-range [0.0, 10.0], with microsecond resolution.
One common problem involves GStreamer attempting to use
incorrectly-configured or absent accelerated hardware h264 video
@@ -780,11 +775,13 @@ parameters to be included with the audiosink name. (Some choices of
audiosink might not work on your system.)
-as 0 (or just -a) suppresses
playing of streamed audio, but displays streamed video.
--ao x.y specifies an audio latency) in (decimal)
-seconds in Audio-only (ALAC), that is reported to the client so it can
-synchronise its video with audio played on the server. Values in the
-range [0.0, 10.0] seconds are allowed, and will be converted to a whole
-number of microseconds. Default is 0.25 sec (250000 usec).
+-al x specifies an audio latency x
+in (decimal) seconds in Audio-only (ALAC), that is reported to the
+client. Values in the range [0.0, 10.0] seconds are allowed, and will be
+converted to a whole number of microseconds. Default is 0.25 sec (250000
+usec). (This replaces the -ao option introduced in v1.62,
+as a workaround for a problem that is now fixed: it is not clear if
+changing the value of x produces any effects, however.)
-ca filename provides a file (where
filename can include a full path) used for output of “cover
art” (from Apple Music, etc.,) in audio-only ALAC mode. This
diff --git a/README.md b/README.md
index 27b3287..ff0b3a8 100644
--- a/README.md
+++ b/README.md
@@ -338,10 +338,6 @@ run "`uxplay -ca &`" in the background, then run a image viewer with an a
is "feh": run "``feh -R 1 ``"
in the foreground; terminate feh and then Uxplay with "`ctrl-C fg ctrl-C`".
-* In Audio-Only mode the server needs to specify a latency to the client so the client can show video in sync with audio played
-on the server. The default is 0.25 seconds: this can be changed with the `-ao x.y` option, where x.y is a decimal
-like 0.25 in the range [0.0, 10.0], with microsecond resolution.
-
**One common problem involves GStreamer
attempting to use incorrectly-configured or absent accelerated hardware h264
video decoding (e.g., VAAPI).
@@ -661,9 +657,10 @@ which will not work if a firewall is running.
**-as 0** (or just **-a**) suppresses playing of streamed audio, but displays streamed video.
-**-ao x.y** specifies an audio latency) in (decimal) seconds in Audio-only (ALAC), that is reported to the client so it
- can synchronise its video with audio played on the server. Values in the range [0.0, 10.0] seconds are allowed, and
- will be converted to a whole number of microseconds. Default is 0.25 sec (250000 usec).
+**-al _x_** specifies an audio latency _x_ in (decimal) seconds in Audio-only (ALAC), that is reported to the client. Values
+ in the range [0.0, 10.0] seconds are allowed, and will be converted to a whole number of microseconds. Default
+ is 0.25 sec (250000 usec). (This replaces the `-ao` option introduced in v1.62, as a workaround for a problem that
+ is now fixed: it is not clear if changing the value of _x_ produces any effects, however.)
**-ca _filename_** provides a file (where _filename_ can include a full path) used for output of "cover art"
(from Apple Music, _etc._,) in audio-only ALAC mode. This file is overwritten with the latest cover art as
diff --git a/README.txt b/README.txt
index 1f26d2c..6bf3857 100644
--- a/README.txt
+++ b/README.txt
@@ -404,12 +404,6 @@ for help with this or other problems.
"`feh -R 1 `" in the foreground; terminate feh and then Uxplay
with "`ctrl-C fg ctrl-C`".
-- In Audio-Only mode the server needs to specify a latency to the
- client so the client can show video in sync with audio played on the
- server. The default is 0.25 seconds: this can be changed with the
- `-ao x.y` option, where x.y is a decimal like 0.25 in the range
- \[0.0, 10.0\], with microsecond resolution.
-
**One common problem involves GStreamer attempting to use
incorrectly-configured or absent accelerated hardware h264 video
decoding (e.g., VAAPI). Try "`uxplay -avdec`" to force software video
@@ -802,11 +796,13 @@ name. (Some choices of audiosink might not work on your system.)
**-as 0** (or just **-a**) suppresses playing of streamed audio, but
displays streamed video.
-**-ao x.y** specifies an audio latency) in (decimal) seconds in
-Audio-only (ALAC), that is reported to the client so it can synchronise
-its video with audio played on the server. Values in the range \[0.0,
-10.0\] seconds are allowed, and will be converted to a whole number of
-microseconds. Default is 0.25 sec (250000 usec).
+**-al *x*** specifies an audio latency *x* in (decimal) seconds in
+Audio-only (ALAC), that is reported to the client. Values in the range
+\[0.0, 10.0\] seconds are allowed, and will be converted to a whole
+number of microseconds. Default is 0.25 sec (250000 usec). (This
+replaces the `-ao` option introduced in v1.62, as a workaround for a
+problem that is now fixed: it is not clear if changing the value of *x*
+produces any effects, however.)
**-ca *filename*** provides a file (where *filename* can include a full
path) used for output of "cover art" (from Apple Music, *etc.*,) in
diff --git a/lib/raop_handlers.h b/lib/raop_handlers.h
index b7c80be..261e3aa 100644
--- a/lib/raop_handlers.h
+++ b/lib/raop_handlers.h
@@ -503,7 +503,6 @@ raop_handler_setup(raop_conn_t *conn,
unsigned short remote_cport = 0;
unsigned char ct;
unsigned int sr = AUDIO_SAMPLE_RATE; /* all AirPlay audio formats supported so far have sample rate 44.1kHz */
- unsigned int ad = (unsigned int) conn->raop->audio_delay_micros;
uint64_t uint_val = 0;
plist_t req_stream_control_port_node = plist_dict_get_item(req_stream_node, "controlPort");
@@ -549,7 +548,7 @@ raop_handler_setup(raop_conn_t *conn,
}
if (conn->raop_rtp) {
- raop_rtp_start_audio(conn->raop_rtp, use_udp, &remote_cport, &cport, &dport, &ct, &sr, &ad);
+ raop_rtp_start_audio(conn->raop_rtp, use_udp, &remote_cport, &cport, &dport, &ct, &sr);
logger_log(conn->raop->logger, LOGGER_DEBUG, "RAOP initialized success");
} else {
logger_log(conn->raop->logger, LOGGER_ERR, "RAOP not initialized at SETUP, playing will fail!");
diff --git a/lib/raop_rtp.c b/lib/raop_rtp.c
index 3c37710..2d7979e 100644
--- a/lib/raop_rtp.c
+++ b/lib/raop_rtp.c
@@ -54,7 +54,6 @@ struct raop_rtp_s {
// Time and sync
raop_ntp_t *ntp;
double rtp_clock_rate;
- unsigned int audio_delay_micros;
int64_t rtp_sync_offset;
raop_rtp_sync_data_t sync_data[RAOP_RTP_SYNC_DATA_COUNT];
int sync_data_index;
@@ -712,7 +711,7 @@ raop_rtp_thread_udp(void *arg)
// Start rtp service, three udp ports
void
raop_rtp_start_audio(raop_rtp_t *raop_rtp, int use_udp, unsigned short *control_rport, unsigned short *control_lport,
- unsigned short *data_lport, unsigned char *ct, unsigned int *sr, unsigned int *ad)
+ unsigned short *data_lport, unsigned char *ct, unsigned int *sr)
{
logger_log(raop_rtp->logger, LOGGER_INFO, "raop_rtp starting audio");
int use_ipv6 = 0;
@@ -727,7 +726,6 @@ raop_rtp_start_audio(raop_rtp_t *raop_rtp, int use_udp, unsigned short *control_
raop_rtp->ct = *ct;
raop_rtp->rtp_clock_rate = SECOND_IN_NSECS / *sr;
- raop_rtp->audio_delay_micros = *ad;
/* Initialize ports and sockets */
raop_rtp->control_lport = *control_lport;
diff --git a/lib/raop_rtp.h b/lib/raop_rtp.h
index 87751b3..675d619 100644
--- a/lib/raop_rtp.h
+++ b/lib/raop_rtp.h
@@ -30,7 +30,7 @@ raop_rtp_t *raop_rtp_init(logger_t *logger, raop_callbacks_t *callbacks, raop_nt
int remotelen, const unsigned char *aeskey, const unsigned char *aesiv);
void raop_rtp_start_audio(raop_rtp_t *raop_rtp, int use_udp, unsigned short *control_rport, unsigned short *control_lport,
- unsigned short *data_lport, unsigned char *ct, unsigned int *sr, unsigned int *ad);
+ unsigned short *data_lport, unsigned char *ct, unsigned int *sr);
void raop_rtp_set_volume(raop_rtp_t *raop_rtp, float volume);
void raop_rtp_set_metadata(raop_rtp_t *raop_rtp, const char *data, int datalen);
diff --git a/uxplay.1 b/uxplay.1
index 976c085..f91280f 100644
--- a/uxplay.1
+++ b/uxplay.1
@@ -73,7 +73,7 @@ UxPlay 1.63: An open\-source AirPlay mirroring (+ audio streaming) server.
.TP
\fB\-as\fR 0 (or \fB\-a\fR) Turn audio off, streamed video only.
.TP
-\fB\-ao\fR x.y Audio-only mode latency in seconds (default 0.25) used by client.
+\fB\-al\fR x Audio latency in seconds (default 0.25) reported to client.
.TP
\fB\-ca\fI fn \fR In Airplay Audio (ALAC) mode, write cover-art to file fn.
.TP
diff --git a/uxplay.cpp b/uxplay.cpp
index 9bec039..e97a4fd 100644
--- a/uxplay.cpp
+++ b/uxplay.cpp
@@ -388,7 +388,7 @@ static void print_info (char *name) {
printf(" some choices:pulsesink,alsasink,pipewiresink,jackaudiosink,\n");
printf(" osssink,oss4sink,osxaudiosink,wasapisink,directsoundsink.\n");
printf("-as 0 (or -a) Turn audio off, streamed video only\n");
- printf("-ao x.y Audio-only mode latency in seconds (default 0.25) used by client.\n");
+ printf("-al x Audio latency in seconds (default 0.25) reported to client.\n");
printf("-ca In Airplay Audio (ALAC) mode, write cover-art to file \n");
printf("-reset n Reset after 3n seconds client silence (default %d, 0=never)\n", NTP_TIMEOUT_LIMIT);
printf("-nc do Not Close video window when client stops mirroring\n");
@@ -738,7 +738,7 @@ static void parse_arguments (int argc, char *argv[]) {
bt709_fix = true;
} else if (arg == "-nohold") {
max_connections = 3;
- } else if (arg == "-ao") {
+ } else if (arg == "-al") {
int n;
char *end;
if (i < argc - 1 && *argv[i+1] != '-') {
@@ -748,7 +748,7 @@ static void parse_arguments (int argc, char *argv[]) {
continue;
}
}
- fprintf(stderr, "invalid argument -ao %s: must be a decimal time offset in seconds, range [0,10]\n"
+ fprintf(stderr, "invalid argument -al %s: must be a decimal time offset in seconds, range [0,10]\n"
"(like 5 or 4.8, which will be converted to a whole number of microseconds)\n", argv[i]);
exit(1);
} else {
@@ -1280,9 +1280,6 @@ int main (int argc, char *argv[]) {
logger_set_level(render_logger, debug_log ? LOGGER_DEBUG : LOGGER_INFO);
if (use_audio) {
- if (audiodelay >= 0) {
- LOGI("Audio-only ALAC streams will be delayed by %d microseconds", audiodelay);
- }
audio_renderer_init(render_logger, audiosink.c_str());
} else {
LOGI("audio_disabled");