Skip to content

Commit

Permalink
Merge pull request #1851 from acli/patch_20240513a
Browse files Browse the repository at this point in the history
Various minor fixes. Many thanks.
  • Loading branch information
mikebrady committed May 15, 2024
2 parents fa74307 + 998776e commit f8e8550
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions audio_pa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions man/Makefile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions man/shairport-sync.1.xml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@
<option>
<p><opt>--statistics</opt></p>
<optdesc><p>
Print some performance information to <file>STDERR</file>, or to <opt>syslog</opt> if the <opt>-log-to-syslog</opt> command line option is also chosen.
Print some performance information to <file>STDERR</file>, or to <opt>syslog</opt> if the <opt>--log-to-syslog</opt> command line option is also chosen.
</p></optdesc>
</option>

Expand Down Expand Up @@ -416,7 +416,7 @@
<option>
<p><opt>-v | --verbose</opt></p>
<optdesc><p>
Print debug information to the <file>STDERR</file>, or to <opt>syslog</opt> if the <opt>-log-to-syslog</opt> command line option is also chosen.
Print debug information to the <file>STDERR</file>, or to <opt>syslog</opt> if the <opt>--log-to-syslog</opt> command line option is also chosen.
Repeat up to three times (i.e. <opt>-vv</opt> or <opt>-vvv</opt>) for more detail. You should use <opt>-vvv</opt> very sparingly -- it is really noisy.
</p></optdesc>
</option>
Expand Down
2 changes: 1 addition & 1 deletion shairport.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f8e8550

Please sign in to comment.