Merge remote branch 'albertz/master'

This commit is contained in:
Martin Spasov
2011-04-14 12:40:53 +03:00
5 changed files with 29 additions and 21 deletions
+2 -2
View File
@@ -7,9 +7,9 @@ You need the following installed:
Perl
Debian/Ubuntu users need:
libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev libio-socket-inet6-perl
libssl-dev libcrypt-openssl-rsa-perl libao2 libao-dev libio-socket-inet6-perl libwww-perl avahi-utils
Perl modules (e.g. `perl -MCPAN -e 'install X'`):
Perl modules (install from CPAN if needed e.g. `perl -MCPAN -e 'install X'`):
HTTP::Message
Crypt::OpenSSL::RSA
IO::Socket::INET6
+15 -3
View File
@@ -1,5 +1,17 @@
#CFLAGS = `pkg-config --cflags --libs openssl` -lportaudio
CFLAGS = `pkg-config --cflags --libs openssl ao`
PKGFLAGS:=$(shell pkg-config --cflags --libs openssl ao)
CFLAGS:=-O2
LDFLAGS:=-lm -lpthread
PAUFLAGS:=-lportaudio
all: hairtunes
hairtunes: hairtunes.c alac.c
gcc hairtunes.c alac.c -D__i386 -lm $(CFLAGS) -o hairtunes
$(CC) $(CFLAGS) $(PKGFLAGS) $(LDFLAGS) $? -o $@
clean:
-@rm -rf hairtunes
.PTHONY: all clean
.SILENT: clean
+6 -5
View File
@@ -1,4 +1,4 @@
Shairport v0.03
Shairport v0.04
==============
James Laird <jhl@mafipulation.org>
April 11, 2011
@@ -38,8 +38,9 @@ Changelog
* 0.02 April 11, 2011
* bugfix: libao compatibility
* 0.03 April 11, 2011
* bugfix: ipv6 didn't work -
* IO::Socket::INET6 is required too
* bugfix: ipv6 didn't work - IO::Socket::INET6 is required too
* 0.04 April 12, 2011
* cross-platform count_leading_zeros under GCC - will now compile cleanly on ARM and other platforms
How to compile and install on Mac OSX 10.6
@@ -55,10 +56,10 @@ prerequisite: install XCode, install homebrew (https://github.com/mxcl/homebrew)
OSX 10.5 only bundles perl 5.8, which won't work with shairport. After getting a update
here (http://www.perl.org/get.html), it worked.
Available launch options for
Available launch options for
------
$ shairport.pl --apname=My Name --password=secret
How to run as a daemon on Mac OSX 10.6
------
+2 -7
View File
@@ -218,18 +218,13 @@ static int count_leading_zeros(int32_t input)
}
return i;
}
#elif defined(__GNUC__) && (defined(_X86) || defined(__i386) || defined(i386))
#elif defined(__GNUC__)
/* for some reason the unrolled version (below) is
* actually faster than this. yay intel!
*/
static int count_leading_zeros(int input)
{
int output = 0;
if (!input) return 32;
__asm("bsr %1, %0\n"
: "=r" (output)
: "r" (input));
return (0x1f - output);
return __builtin_clz(input);
}
#elif defined(_MSC_VER) && defined(_M_IX86)
static int count_leading_zeros(int input)
+4 -4
View File
@@ -114,10 +114,10 @@ my $listen;
Proto => 'tcp');
};
if ($@) {
print "**************************************\n\n",
"* IO::Socket::INET6 not present! *\n",
"* Install this if iTunes won't play. *\n",
"**************************************\n\n";
print "**************************************\n",
"* IO::Socket::INET6 not present! *\n",
"* Install this if iTunes won't play. *\n",
"**************************************\n\n";
$listen = new IO::Socket::INET(Listen => 1,
LocalPort => 5000,