From 9a73214b9f5d89d816e3cb65fdea09a94b600792 Mon Sep 17 00:00:00 2001 From: Matthias Neeracher Date: Sun, 24 Jul 2011 03:29:15 +0000 Subject: [PATCH] Switch to more modern int swapping routines --- Sources/CoreAudioSDK/CAAudioFileFormats.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/CoreAudioSDK/CAAudioFileFormats.cpp b/Sources/CoreAudioSDK/CAAudioFileFormats.cpp index bfda712..51e37d1 100644 --- a/Sources/CoreAudioSDK/CAAudioFileFormats.cpp +++ b/Sources/CoreAudioSDK/CAAudioFileFormats.cpp @@ -312,7 +312,7 @@ char *OSTypeToStr(char *buf, OSType t) { char *p = buf; char str[4], *q = str; - *(UInt32 *)str = EndianU32_NtoB(t); + *(UInt32 *)str = OSSwapHostToBigInt32(t); for (int i = 0; i < 4; ++i) { if (isprint(*q) && *q != '\\') *p++ = *q++; @@ -348,7 +348,7 @@ int StrToOSType(const char *str, OSType &t) p += 2; } } - t = EndianU32_BtoN(*(UInt32 *)buf); + t = OSSwapBigToHostInt32(*(UInt32 *)buf); return p - str; fail: return 0;