You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
578 B

  1. --- a/src/lib/alac/alac.c
  2. +++ b/src/lib/alac/alac.c
  3. @@ -29,11 +29,7 @@
  4. *
  5. */
  6. -#ifdef __BIG_ENDIAN__
  7. -static const int host_bigendian = 1;
  8. -#else
  9. -static const int host_bigendian = 0;
  10. -#endif
  11. +static int host_bigendian = 0;
  12. #include <stdio.h>
  13. #include <stdlib.h>
  14. @@ -1181,6 +1177,8 @@ alac_file *create_alac(int samplesize, i
  15. {
  16. alac_file *newfile = malloc(sizeof(alac_file));
  17. + host_bigendian = (htonl(42) == 42);
  18. +
  19. newfile->samplesize = samplesize;
  20. newfile->numchannels = numchannels;
  21. newfile->bytespersample = (samplesize / 8) * numchannels;