Hello!
I'm trying to run an application using Juce on a iPhone5s in 64 bit mode, but I'm hitting an assertion in juce_Atomic.h, line 205.
Jules, could you please take a look at the issue?
I'm using the latest tip from today.
Thanks!
Hello!
I'm trying to run an application using Juce on a iPhone5s in 64 bit mode, but I'm hitting an assertion in juce_Atomic.h, line 205.
Jules, could you please take a look at the issue?
I'm using the latest tip from today.
Thanks!
Hmm - actually, it looks like since I wrote those stubbed-out functions, Apple have added support for the 64-bit ops in the later iOS SDKs.
I haven't got Xcode5 yet to try this myself, but you might want to just try commenting out that whole section, e.g.
// #if JUCE_PPC || JUCE_IOS
// // None of these atomics are available for PPC or for iOS 3.1 or earlier!!
// template <typename Type> static Type OSAtomicAdd64Barrier (Type b, JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return *a += b; }
// template <typename Type> static Type OSAtomicIncrement64Barrier (JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return ++*a; }
// template <typename Type> static Type OSAtomicDecrement64Barrier (JUCE_MAC_ATOMICS_VOLATILE Type* a) noexcept { jassertfalse; return --*a; }
// template <typename Type> static bool OSAtomicCompareAndSwap64Barrier (Type old, Type newValue, JUCE_MAC_ATOMICS_VOLATILE Type* value) noexcept
// { jassertfalse; if (old == *value) { *value = newValue; return true; } return false; }
// #define JUCE_64BIT_ATOMICS_UNAVAILABLE 1
// #endif
..and see if it works correctly. It does seem to compile here for 32-bit ARM.
Yep!
This indeed does the trick, it's running fine now!
Thanks, I'll remove them now. I vaguely remember those stubs just being there as a workaround until Apple got their shit together.
Thank you for the fast fix :)
If you could restore this code to juce_Atomic.h, but change the compilation conditional to
#if JUCE_PPC
this would allow for 32-bit OSX audio plugins to continue compiling correctly, and will hopefully fix the iOS issue as well.
Thanks,
Sean Costello