Skip to content

Commit

Permalink
Merge branch 'dantheperson-development' into development
Browse files Browse the repository at this point in the history
also fix a sillt deletion bug
  • Loading branch information
mikebrady committed Dec 21, 2015
2 parents 2279cc4 + 53b2896 commit 2003de6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@ if INSTALL_SYSTEMV
[ -f $(DESTDIR)/etc/init.d/shairport-sync ] || cp scripts/shairport-sync $(DESTDIR)/etc/init.d/
endif
if INSTALL_SYSTEMD
[ -e $(DESTDIR)/usr/lib/systemd/system ] || mkdir -p $(DESTDIR)/usr/lib/systemd/system
cp scripts/shairport-sync.service $(DESTDIR)/usr/lib/systemd/system
[ -e $(DESTDIR)$(systemdsystemunitdir) ] || mkdir -p $(DESTDIR)$(systemdsystemunitdir)
cp scripts/shairport-sync.service $(DESTDIR)$(systemdsystemunitdir)
endif
2 changes: 2 additions & 0 deletions audio_alsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,11 @@ static void deinit(void) {
int open_alsa_device(void) {
const snd_pcm_uframes_t minimal_buffer_headroom = 352*2; // we accept this much headroom in the hardware buffer, but we'll accept less
const snd_pcm_uframes_t requested_buffer_headroom = minimal_buffer_headroom+2048; // we ask for this much headroom in the hardware buffer, but we'll accept less
int ret, dir = 0;
unsigned int my_sample_rate = desired_sample_rate;
//snd_pcm_uframes_t frames = 441 * 10;
snd_pcm_uframes_t buffer_size, actual_buffer_length;

ret = snd_pcm_open(&alsa_handle, alsa_out_dev, SND_PCM_STREAM_PLAYBACK, 0);
if (ret < 0)
return (ret);
Expand Down
16 changes: 16 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,22 @@ AC_ARG_WITH(dns_sd, [ --with-dns_sd = choose dns_sd mDNS support], [
AC_SEARCH_LIBS([DNSServiceRefDeallocate], [dns_sd], , AC_MSG_ERROR(dns_sd support requires the dns_sd library!))], )
AM_CONDITIONAL([USE_DNS_SD], [test "x$HAS_DNS_SD" = "x1"])

# Find systemd unit dir
AC_ARG_WITH([systemdsystemunitdir],
[AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
[with_systemdsystemunitdir=auto])
AS_IF([test "x$with_systemdsystemunitdir" = "xyes" -o "x$with_systemdsystemunitdir" = "xauto"], [
def_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
AS_IF([test "x$def_systemdsystemunitdir" = "x"],
[AS_IF([test "x$with_systemdsystemunitdir" = "xyes"],
[AC_MSG_ERROR([systemd support requested but pkg-config unable to query systemd package])])
with_systemdsystemunitdir=no],
[with_systemdsystemunitdir="$def_systemdsystemunitdir"])])
AS_IF([test "x$with_systemdsystemunitdir" != "xno"],
[AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])])
AM_CONDITIONAL([HAVE_SYSTEMD], [test "x$with_systemdsystemunitdir" != "xno"])

# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([getopt_long.h])
Expand Down

0 comments on commit 2003de6

Please sign in to comment.