| 1 |
thl |
1.1 |
diff -up libdca-0.0.5/libao/Makefile.in.aliasing libdca-0.0.5/libao/Makefile.in
|
| 2 |
|
|
--- libdca-0.0.5/libao/Makefile.in.aliasing 2007-11-02 21:16:15.000000000 +0100
|
| 3 |
|
|
+++ libdca-0.0.5/libao/Makefile.in 2007-11-02 21:16:46.000000000 +0100
|
| 4 |
|
|
@@ -172,7 +172,7 @@ sysconfdir = @sysconfdir@
|
| 5 |
|
|
target_alias = @target_alias@
|
| 6 |
|
|
top_builddir = @top_builddir@
|
| 7 |
|
|
top_srcdir = @top_srcdir@
|
| 8 |
|
|
-AM_CFLAGS = $(OPT_CFLAGS)
|
| 9 |
|
|
+AM_CFLAGS = $(OPT_CFLAGS) -fno-strict-aliasing
|
| 10 |
|
|
AM_CPPFLAGS = -I$(top_srcdir)/include
|
| 11 |
|
|
noinst_LTLIBRARIES = libao.la
|
| 12 |
|
|
libao_la_SOURCES = audio_out.c audio_out_null.c audio_out_float.c \
|
| 13 |
|
|
diff -up libdca-0.0.5/libao/Makefile.am.aliasing libdca-0.0.5/libao/Makefile.am
|
| 14 |
|
|
--- libdca-0.0.5/libao/Makefile.am.aliasing 2007-04-08 10:23:11.000000000 +0200
|
| 15 |
|
|
+++ libdca-0.0.5/libao/Makefile.am 2007-11-02 21:16:08.000000000 +0100
|
| 16 |
|
|
@@ -1,4 +1,4 @@
|
| 17 |
|
|
-AM_CFLAGS = $(OPT_CFLAGS)
|
| 18 |
|
|
+AM_CFLAGS = $(OPT_CFLAGS) -fno-strict-aliasing
|
| 19 |
|
|
AM_CPPFLAGS = -I$(top_srcdir)/include
|
| 20 |
|
|
|
| 21 |
|
|
noinst_LTLIBRARIES = libao.la
|
| 22 |
|
|
diff -up libdca-0.0.5/libdca/bitstream.h.aliasing libdca-0.0.5/libdca/bitstream.h
|
| 23 |
|
|
--- libdca-0.0.5/libdca/bitstream.h.aliasing 2007-04-08 11:08:35.000000000 +0200
|
| 24 |
|
|
+++ libdca-0.0.5/libdca/bitstream.h 2007-11-02 21:20:07.000000000 +0100
|
| 25 |
|
|
@@ -29,22 +29,38 @@
|
| 26 |
|
|
|
| 27 |
|
|
#else
|
| 28 |
|
|
|
| 29 |
|
|
-# define swab32(x)\
|
| 30 |
|
|
-((((uint8_t*)&x)[0] << 24) | (((uint8_t*)&x)[1] << 16) | \
|
| 31 |
|
|
- (((uint8_t*)&x)[2] << 8) | (((uint8_t*)&x)[3]))
|
| 32 |
|
|
+static inline uint32_t swab32(uint32_t x) {
|
| 33 |
|
|
+ union {
|
| 34 |
|
|
+ uint32_t x32;
|
| 35 |
|
|
+ uint8_t x8[4];
|
| 36 |
|
|
+ } u;
|
| 37 |
|
|
+ u.x32 = x;
|
| 38 |
|
|
+ return u.x8[0] << 24 | u.x8[1] << 16 | u.x8[2] << 8 | u.x8[3];
|
| 39 |
|
|
+}
|
| 40 |
|
|
|
| 41 |
|
|
#endif
|
| 42 |
|
|
|
| 43 |
|
|
#ifdef WORDS_BIGENDIAN
|
| 44 |
|
|
|
| 45 |
|
|
-# define swable32(x)\
|
| 46 |
|
|
-((((uint8_t*)&x)[0] << 16) | (((uint8_t*)&x)[1] << 24) | \
|
| 47 |
|
|
- (((uint8_t*)&x)[2]) | (((uint8_t*)&x)[3] << 8))
|
| 48 |
|
|
+static inline uint32_t swable32(uint32_t x) {
|
| 49 |
|
|
+ union {
|
| 50 |
|
|
+ uint32_t x32;
|
| 51 |
|
|
+ uint8_t x8[4];
|
| 52 |
|
|
+ } u;
|
| 53 |
|
|
+ u.x32 = x;
|
| 54 |
|
|
+ return u.x8[0] << 16 | u.x8[1] << 24 | u.x8[2] | u.x8[3] << 8;
|
| 55 |
|
|
+}
|
| 56 |
|
|
|
| 57 |
|
|
#else
|
| 58 |
|
|
|
| 59 |
|
|
-# define swable32(x)\
|
| 60 |
|
|
-((((uint32_t)x) >> 16) | (((uint32_t)x) << 16))
|
| 61 |
|
|
+static inline uint32_t swable32(uint32_t x) {
|
| 62 |
|
|
+ union {
|
| 63 |
|
|
+ uint32_t x32;
|
| 64 |
|
|
+ uint16_t x16[2];
|
| 65 |
|
|
+ } u;
|
| 66 |
|
|
+ u.x32 = x;
|
| 67 |
|
|
+ return u.x16[0] << 16 | u.x16[1];
|
| 68 |
|
|
+}
|
| 69 |
|
|
|
| 70 |
|
|
#endif
|
| 71 |
|
|
|