1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-22 01:34:21 +00:00

Added Value support to the Button's toggle state and TextEditor content. Refactored the atomic operation functions to live inside a class called Atomic, and the byte order functions into a class called ByteOrder.

This commit is contained in:
Julian Storer 2010-01-10 22:00:59 +00:00
parent 3ddbc82f9f
commit 18ffeba9da
64 changed files with 3721 additions and 3609 deletions

View file

@ -177,20 +177,26 @@ struct fxProgramSet
};
#ifdef JUCE_LITTLE_ENDIAN
static long vst_swap (const long x) throw() { return (long) swapByteOrder ((uint32) x); }
static long vst_swap (const long x) throw()
{
#ifdef JUCE_LITTLE_ENDIAN
return (long) ByteOrder::swap ((uint32) x);
#else
return x;
#endif
}
static float vst_swapFloat (const float x) throw()
{
union { uint32 asInt; float asFloat; } n;
n.asFloat = x;
n.asInt = swapByteOrder (n.asInt);
return n.asFloat;
}
#else
#define vst_swap(x) (x)
#define vst_swapFloat(x) (x)
#endif
static float vst_swapFloat (const float x) throw()
{
#ifdef JUCE_LITTLE_ENDIAN
union { uint32 asInt; float asFloat; } n;
n.asFloat = x;
n.asInt = ByteOrder::swap (n.asInt);
return n.asFloat;
#else
return x;
#endif
}
//==============================================================================
typedef AEffect* (*MainCall) (audioMasterCallback);