shairplay: Move to sound menu and sub-directory

Signed-off-by: Ted Hess <thess@kitschensync.net>
This commit is contained in:
Ted Hess
2015-02-04 15:13:08 -05:00
parent 3e58633462
commit a9f87e3851
6 changed files with 4 additions and 4 deletions
@@ -0,0 +1,11 @@
--- a/src/shairplay.c
+++ b/src/shairplay.c
@@ -346,7 +346,7 @@ main(int argc, char *argv[])
raop_cbs.audio_destroy = audio_destroy;
raop_cbs.audio_set_volume = audio_set_volume;
- raop = raop_init_from_keyfile(10, &raop_cbs, "airport.key", NULL);
+ raop = raop_init_from_keyfile(10, &raop_cbs, "/usr/share/shairplay/airport.key", NULL);
if (raop == NULL) {
fprintf(stderr, "Could not initialize the RAOP service\n");
fprintf(stderr, "Please make sure the airport.key file is in the current directory.\n");
@@ -0,0 +1,11 @@
--- a/src/lib/dnssd.c
+++ b/src/lib/dnssd.c
@@ -167,7 +167,7 @@ dnssd_init(int *error)
return NULL;
}
#elif USE_LIBDL
- dnssd->module = dlopen("libdns_sd.so", RTLD_LAZY);
+ dnssd->module = dlopen("libdns_sd.so.1", RTLD_LAZY);
if (!dnssd->module) {
if (error) *error = DNSSD_ERROR_LIBNOTFOUND;
free(dnssd);
@@ -0,0 +1,24 @@
--- a/src/lib/alac/alac.c
+++ b/src/lib/alac/alac.c
@@ -29,11 +29,7 @@
*
*/
-#ifdef __BIG_ENDIAN__
-static const int host_bigendian = 1;
-#else
-static const int host_bigendian = 0;
-#endif
+static int host_bigendian = 0;
#include <stdio.h>
#include <stdlib.h>
@@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
{
alac_file *newfile = malloc(sizeof(alac_file));
+ host_bigendian = (htonl(42) == 42);
+
newfile->samplesize = samplesize;
newfile->numchannels = numchannels;
newfile->bytespersample = (samplesize / 8) * numchannels;