Fix a compilation error in audio_pulse.c and fix a related script error in configure.ac

This commit is contained in:
Mike Brady
2016-05-31 20:39:58 +01:00
parent 713543f72b
commit 4f3af1842c
2 changed files with 8 additions and 8 deletions
+5 -5
View File
@@ -42,8 +42,8 @@ static pa_simple *pa_dev = NULL;
static struct {
char *server;
char *sink;
char *apname;
} pulse_options = {.server = NULL, .sink = NULL, .apname = NULL};
char *service_name;
} pulse_options = {.server = NULL, .sink = NULL, .service_name = NULL};
static int pa_error;
@@ -58,7 +58,7 @@ static void help(void) {
static int init(int argc, char **argv) {
pulse_options.apname = config.apname;
pulse_options.service_name = config.service_name;
config.audio_backend_buffer_desired_length = 44100; // one second.
config.audio_backend_latency_offset = 0;
@@ -78,7 +78,7 @@ static int init(int argc, char **argv) {
pulse_options.sink = optarg;
break;
case 'n':
pulse_options.apname = optarg;
pulse_options.service_name = optarg;
break;
default:
help();
@@ -97,7 +97,7 @@ static int init(int argc, char **argv) {
static void pulse_connect(void) {
static const pa_sample_spec ss = {.format = PA_SAMPLE_S16LE, .rate = 44100, .channels = 2};
pa_dev = pa_simple_new(pulse_options.server, pulse_options.apname, PA_STREAM_PLAYBACK,
pa_dev = pa_simple_new(pulse_options.server, pulse_options.service_name, PA_STREAM_PLAYBACK,
pulse_options.sink, "Shairport Stream", &ss, NULL, NULL, &pa_error);
if (!pa_dev)
+3 -3
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.50])
AC_INIT([shairport-sync], [2.8.4], [mikebrady@eircom.net])
AC_INIT([shairport-sync], [2.8.4.1], [mikebrady@eircom.net])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([shairport.c])
AC_CONFIG_HEADERS([config.h])
@@ -202,8 +202,8 @@ AC_ARG_WITH(pulseaudio, [ --with-pulseaudio = choose PulseAudio API support. N.
AC_MSG_RESULT(>>Including a PulseAudio back end. N.B. no synchronisation -- so underflow or overflow is inevitable!)
HAS_PULSE=1
AC_DEFINE([CONFIG_PULSE], 1, [Needed by the compiler.])
AC_CHECK_LIB([pulse-simple], [pa_simple_new], , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library, possibly in the package libpulse-dev!))
AC_CHECK_LIB([pulse], [pa_stream_peek], , AC_MSG_ERROR(PulseAudio support requires the libpulse-dev library!))], )
AC_CHECK_LIB([pulse-simple], [pa_simple_new], , AC_MSG_ERROR(PulseAudio support requires the pulse-simple library -- possibly in the libpulse-dev package!))
AC_CHECK_LIB([pulse], [pa_stream_peek], , AC_MSG_ERROR(PulseAudio support requires the libpulse-dev library.))], )
AM_CONDITIONAL([USE_PULSE], [test "x$HAS_PULSE" = "x1"])
# Look for dns_sd flag