aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-16 21:09:19 +0200
committerMax Kellermann <max@duempel.org>2013-10-16 22:09:44 +0200
commit5e26e2ab1dadb1e4176d5a4cac03100a7d21c22f (patch)
treefccf16ec9b798ab06913250073e003b2830d2817 /test
parent08eca827b659f2becc872c151919948b5a9ffe4d (diff)
downloadmpd-5e26e2ab1dadb1e4176d5a4cac03100a7d21c22f.tar.gz
mpd-5e26e2ab1dadb1e4176d5a4cac03100a7d21c22f.tar.xz
mpd-5e26e2ab1dadb1e4176d5a4cac03100a7d21c22f.zip
system/ByteOrder: new library for byte ordering / endianess
Replacing GLib macros.
Diffstat (limited to 'test')
-rw-r--r--test/test_pcm_pack.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/test_pcm_pack.cxx b/test/test_pcm_pack.cxx
index 4c105ce08..49840ddb0 100644
--- a/test/test_pcm_pack.cxx
+++ b/test/test_pcm_pack.cxx
@@ -20,6 +20,7 @@
#include "test_pcm_all.hxx"
#include "test_pcm_util.hxx"
#include "pcm/PcmPack.hxx"
+#include "system/ByteOrder.hxx"
#include <glib.h>
@@ -34,7 +35,7 @@ test_pcm_pack_24()
for (unsigned i = 0; i < N; ++i) {
int32_t d;
- if (G_BYTE_ORDER == G_BIG_ENDIAN)
+ if (IsBigEndian())
d = (dest[i * 3] << 16) | (dest[i * 3 + 1] << 8)
| dest[i * 3 + 2];
else
@@ -58,7 +59,7 @@ test_pcm_unpack_24()
for (unsigned i = 0; i < N; ++i) {
int32_t s;
- if (G_BYTE_ORDER == G_BIG_ENDIAN)
+ if (IsBigEndian())
s = (src[i * 3] << 16) | (src[i * 3 + 1] << 8)
| src[i * 3 + 2];
else