diff --git a/audio_pa.c b/audio_pa.c index 6982c8fb0..56c51e934 100644 --- a/audio_pa.c +++ b/audio_pa.c @@ -41,7 +41,7 @@ #define RATE 44100 // Four seconds buffer -- should be plenty -#define buffer_allocation 44100 * 4 * 2 * 2 +#define buffer_allocation RATE * 4 * 2 * 2 static pthread_mutex_t buffer_mutex = PTHREAD_MUTEX_INITIALIZER; @@ -399,7 +399,7 @@ void stream_write_cb(pa_stream *stream, size_t requested_bytes, ret = pa_stream_begin_write(stream, (void **)&buffer, &bytes_we_can_transfer); if ((ret == 0) && (buffer != NULL)) { if (bytes_we_can_transfer <= (size_t)(audio_umb - audio_toq)) { - // the bytes are all in a row in the audo buffer + // the bytes are all in a row in the audio buffer memcpy(buffer, audio_toq, bytes_we_can_transfer); audio_toq += bytes_we_can_transfer; ret = pa_stream_write(stream, buffer, bytes_we_can_transfer, NULL, 0LL, PA_SEEK_RELATIVE); diff --git a/man/Makefile b/man/Makefile index 53cceef80..cf52c5abd 100644 --- a/man/Makefile +++ b/man/Makefile @@ -1,10 +1,10 @@ -shairport-sync.1: shairport-sync.1.xml - xmltoman shairport-sync.1.xml > shairport-sync.1 +all: shairport-sync.1 shairport-sync.html -shairport-sync.html: shairport-sync.1.xml - xsltproc xmltoman.xsl shairport-sync.1.xml > shairport-sync.html +%.1: %.1.xml + xmltoman $*.1.xml > $*.tmp && mv $*.tmp $*.1 -all: shairport-sync.1 shairport-sync.html +%.html: %.1.xml + xsltproc xmltoman.xsl $*.1.xml > $*.tmp && mv $*.tmp $*.html clean: rm shairport-sync.1 diff --git a/man/shairport-sync.1.xml b/man/shairport-sync.1.xml index 240a8e45d..44a3ff366 100644 --- a/man/shairport-sync.1.xml +++ b/man/shairport-sync.1.xml @@ -353,7 +353,7 @@ @@ -416,7 +416,7 @@ diff --git a/shairport.c b/shairport.c index c3c3b6242..cb1e6cb30 100644 --- a/shairport.c +++ b/shairport.c @@ -291,7 +291,7 @@ void usage(char *progname) { printf(" -c, --configfile=FILE Read configuration settings from FILE. Default is %s.\n", configuration_file_path); printf(" -a, --name=NAME Set service name. Default is the hostname with first letter capitalised.\n"); printf(" --password=PASSWORD Require PASSWORD to connect. Default is no password. (Classic AirPlay only.)\n"); - printf(" -p, --port=PORT Set RTSP listening port. Default 5000; 7000 for AirPlay 2./\n"); + printf(" -p, --port=PORT Set RTSP listening port. Default 5000; 7000 for AirPlay 2.\n"); printf(" -L, --latency=FRAMES [Deprecated] Set the latency for audio sent from an unknown device.\n"); printf(" The default is to set it automatically.\n"); printf(" -S, --stuffing=MODE Set how to adjust current latency to match desired latency, where:\n");