From 5e26e2ab1dadb1e4176d5a4cac03100a7d21c22f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 16 Oct 2013 21:09:19 +0200 Subject: system/ByteOrder: new library for byte ordering / endianess Replacing GLib macros. --- test/test_pcm_pack.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test') 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 @@ -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 -- cgit v1.2.3