Permalink
Browse files

Sync QtCollider with main SuperCollider

  • Loading branch information...
2 parents 4097192 + 4879230 commit f7e0875f3a1a30f5b7e41ed741bb170979d97efb @jleben jleben committed Feb 6, 2011
View
@@ -192,9 +192,9 @@ if (SC_QT)
endif (SC_QT)
if(CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
- install(DIRECTORY include
+ install(DIRECTORY include/common include/plugin_interface include/server include/lang
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/SuperCollider
- PATTERN app* EXCLUDE
+ FILES_MATCHING PATTERN "*.h"
)
endif()
@@ -150,13 +150,14 @@ In : AbstractIn {
}
LocalIn : AbstractIn {
- *ar { arg numChannels = 1;
- ^this.multiNew('audio', numChannels)
+ *ar { arg numChannels = 1, default = 0.0;
+ ^this.multiNew('audio', numChannels, *default)
}
- *kr { arg numChannels = 1;
- ^this.multiNew('control', numChannels)
+ *kr { arg numChannels = 1, default = 0.0;
+ ^this.multiNew('control', numChannels, *default)
}
- init { arg numChannels;
+ init { arg numChannels ... default;
+ inputs = default.wrapExtend(numChannels);
^this.initOutputs(numChannels, rate)
}
}
View
@@ -38,6 +38,8 @@ For speed we keep this global, although this makes the code non-thread-safe.
// We include vDSP even if not using for FFT, since we want to use some vectorised add/mul tricks
#if defined(__APPLE__) && !defined(SC_IPHONE)
#include "vecLib/vDSP.h"
+#elif defined(SC_IPHONE)
+ #include <Accelerate/Accelerate.h>
#endif
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -54,7 +56,7 @@ For speed we keep this global, although this makes the code non-thread-safe.
#define SC_FFT_FFTW 0
#define SC_FFT_VDSP 0
#define SC_FFT_GREEN 1
-#elif !SC_FFT_FFTW && defined(__APPLE__) && !defined(SC_IPHONE) && !defined(SUPERNOVA)
+#elif !SC_FFT_FFTW && defined(__APPLE__) && !defined(SUPERNOVA)
#define SC_FFT_FFTW 0
#define SC_FFT_VDSP 1
#define SC_FFT_GREEN 0
@@ -582,6 +582,7 @@ NSString* helpFileWithName(NSFileManager* fileManager, NSString* desiredHelpFile
|| [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".rtfd"]]
|| [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".scd"]]
|| [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".help.scd"]]
+ || [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".schelp"]]
|| [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".help.rtf"]]
|| [[fullName lastPathComponent] isEqualToString: [helpFileName stringByAppendingString: @".htm"]]
) {
@@ -52,16 +52,22 @@ typedef vector float vfloat32;
#define v0123_4ths (vec_ctf(vec_unpackh(vec_unpackh((vector signed char)vec_lvsl(0,(int*)0))), 2))
#define vstart(x, vslope) (vec_madd(vslope, v0123_4ths, vload(x)))
-#define vec_not(a) (vtemp = (a); vec_nor(vtemp, vtemp))
-#ifdef vec_cmplt
-# undef vec_cmplt
-#endif
-#define vec_cmplt(a, b) (vec_cmpgt(b, a))
-#ifdef vec_cmple
-# undef vec_cmple
-#endif
-#define vec_cmple(a, b) (vec_cmpge(b, a))
-#define vec_mul(a, b) (vec_madd(a, b, vzero))
+inline vint32 vec_not(vint32 arg)
+{
+ return vec_nor(arg, arg);
+}
+
+inline vfloat32 vec_not(vfloat32 arg)
+{
+ return vec_nor(arg, arg);
+}
+
+inline vfloat32 vec_mul(vfloat32 a, vfloat32 b)
+{
+ define_vzero;
+ return vec_madd(a, b, vzero);
+}
+
#define vec_2sComp(x) (vec_sub(vec_sub (x, x), x))
#define USEVEC (ft->mAltivecAvailable && !(BUFLENGTH & 3))
@@ -853,7 +853,7 @@ void executeMethodWithKeys(VMGlobals *g, PyrMethod *meth, long allArgsPushed, lo
if (gTraceInterpreter) {
if (g->method) {
postfl(" %s:%s -> %s:%s\n",
- slotRawClass(&g->method->ownerclass)->name.us->name, g->slotRawSymbol(&method->name)->name,
+ slotRawSymbol(&slotRawClass(&g->method->ownerclass)->name)->name, slotRawSymbol(&g->method->name)->name,
slotRawSymbol(&slotRawClass(&meth->ownerclass)->name)->name, slotRawSymbol(&meth->name)->name);
} else {
postfl(" top -> %s:%s\n",
@@ -1009,7 +1009,7 @@ void executeMethod(VMGlobals *g, PyrMethod *meth, long numArgsPushed)
if (gTraceInterpreter) {
if (g->method) {
postfl(" %s:%s -> %s:%s\n",
- slotRawClass(&g->method->ownerclass)->name.us->name, g->slotRawSymbol(&method->name)->name,
+ slotRawSymbol(&slotRawClass(&g->method->ownerclass)->name)->name, slotRawSymbol(&g->method->name)->name,
slotRawSymbol(&slotRawClass(&meth->ownerclass)->name)->name, slotRawSymbol(&meth->name)->name);
} else {
postfl(" top -> %s:%s\n",
@@ -1297,7 +1297,7 @@ void returnFromMethod(VMGlobals *g)
if (gTraceInterpreter) {
postfl("%s:%s <- %s:%s\n",
slotRawSymbol(&slotRawClass(&meth->ownerclass)->name)->name, slotRawSymbol(&meth->name)->name,
- slotRawClass(&g->method->ownerclass)->name.us->name, g->slotRawSymbol(&method->name)->name
+ slotRawSymbol(&slotRawClass(&g->method->ownerclass)->name)->name, slotRawSymbol(&g->method->name)->name
);
}
#endif
@@ -2347,7 +2347,7 @@ int getIndexedInt(PyrObject *obj, int index, int *value)
}
break;
case obj_double :
- *value = (int)slotRawFloat(&obj->slots[index]);
+ *value = (int)((double*)(obj->slots))[index];
break;
case obj_float :
*value = (int)((float*)(obj->slots))[index];
@@ -2384,7 +2384,7 @@ int getIndexedFloat(PyrObject *obj, int index, float *value)
}
break;
case obj_double :
- *value = slotRawFloat(&obj->slots[index]);
+ *value = ((double*)(obj->slots))[index];
break;
case obj_float :
*value = ((float*)(obj->slots))[index];
@@ -2421,7 +2421,7 @@ int getIndexedDouble(PyrObject *obj, int index, double *value)
}
break;
case obj_double :
- *value = slotRawFloat(&obj->slots[index]);
+ *value = ((double*)(obj->slots))[index];
break;
case obj_float :
*value = ((float*)(obj->slots))[index];
@@ -2448,9 +2448,11 @@ void getIndexedSlot(PyrObject *obj, PyrSlot *a, int index)
// obj, index);
switch (obj->obj_format) {
case obj_slot :
- case obj_double :
slotCopy(a, &obj->slots[index]);
break;
+ case obj_double :
+ SetFloat(a, ((double*)(obj->slots))[index]);
+ break;
case obj_float :
SetFloat(a, ((float*)(obj->slots))[index]);
break;
@@ -2486,20 +2488,19 @@ int putIndexedSlot(VMGlobals *g, PyrObject *obj, PyrSlot *c, int index)
if (NotFloat(c)) {
if (NotInt(c)) return errWrongType;
else {
- SetFloat(&obj->slots[index], slotRawInt(c));
+ ((double*)(obj->slots))[index] = slotRawInt(c);
}
} else
- SetRaw(&obj->slots[index], slotRawFloat(c));
+ ((double*)(obj->slots))[index] = slotRawFloat(c);
break;
case obj_float :
if (NotFloat(c)) {
if (NotInt(c)) return errWrongType;
else {
((float*)(obj->slots))[index] = slotRawInt(c);
}
- } else {
+ } else
((float*)(obj->slots))[index] = slotRawFloat(c);
- }
break;
case obj_int32 :
if (NotInt(c)) return errWrongType;
@@ -2535,7 +2536,7 @@ int putIndexedFloat(PyrObject *obj, double val, int index)
SetFloat(slot, val);
break;
case obj_double :
- SetFloat(&obj->slots[index], val);
+ ((double*)(obj->slots))[index] = val;
break;
case obj_float :
((float*)(obj->slots))[index] = (float)val;
@@ -83,8 +83,9 @@
7725B4BD1191E0510056CA2F /* SuperCollider_BrowserPage.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7725B4BC1191E0510056CA2F /* SuperCollider_BrowserPage.xib */; };
772C0EA012DA0D6F009C0126 /* SC_fftlib.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 772C0E9A12DA0CCA009C0126 /* SC_fftlib.cpp */; };
772C0F3312DA126F009C0126 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 77BA5239129C374C00CE89DD /* MediaPlayer.framework */; };
- 7752352312F59638005AE5FE /* scUBlibsndfile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 77597AEF1123323800D2A968 /* scUBlibsndfile.a */; };
+ 774770CF12FDE7EB007449B3 /* scUBlibsndfile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 77597AEF1123323800D2A968 /* scUBlibsndfile.a */; };
775574050FBE45A500192282 /* SuperCollider_FileTransfer.xib in Resources */ = {isa = PBXBuildFile; fileRef = 775574040FBE45A500192282 /* SuperCollider_FileTransfer.xib */; };
+ 7759955312FDE20A00603187 /* Accelerate.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7759955212FDE20A00603187 /* Accelerate.framework */; };
776B2A97119075EF001F253D /* JITLib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 776B2A70119075EC001F253D /* JITLib */; };
778F12C10F50A92100CB6629 /* sounds in CopyFiles */ = {isa = PBXBuildFile; fileRef = 778F129F0F50A92100CB6629 /* sounds */; };
778F12C30F50A92100CB6629 /* patches in CopyFiles */ = {isa = PBXBuildFile; fileRef = 778F12AD0F50A92100CB6629 /* patches */; };
@@ -416,6 +417,7 @@
775574040FBE45A500192282 /* SuperCollider_FileTransfer.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = SuperCollider_FileTransfer.xib; path = "iPhone Resources/SuperCollider_FileTransfer.xib"; sourceTree = "<group>"; };
77597AEA1123320700D2A968 /* libsndfile_iphone.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsndfile_iphone.a; path = lib/libsndfile_iphone.a; sourceTree = "<group>"; };
77597AEF1123323800D2A968 /* scUBlibsndfile.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = scUBlibsndfile.a; path = ../mac/lib/scUBlibsndfile.a; sourceTree = SOURCE_ROOT; };
+ 7759955212FDE20A00603187 /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
776B2A70119075EC001F253D /* JITLib */ = {isa = PBXFileReference; lastKnownFileType = folder; name = JITLib; path = ../../SCClassLibrary/JITLib; sourceTree = SOURCE_ROOT; };
778F129F0F50A92100CB6629 /* sounds */ = {isa = PBXFileReference; lastKnownFileType = folder; name = sounds; path = "iPhone Resources/sounds"; sourceTree = "<group>"; };
778F12AD0F50A92100CB6629 /* patches */ = {isa = PBXFileReference; lastKnownFileType = folder; name = patches; path = "iPhone Resources/patches"; sourceTree = "<group>"; };
@@ -451,7 +453,8 @@
77BA523C129C375700CE89DD /* UIKit.framework in Frameworks */,
77BA523E129C376000CE89DD /* Foundation.framework in Frameworks */,
772C0F3312DA126F009C0126 /* MediaPlayer.framework in Frameworks */,
- 7752352312F59638005AE5FE /* scUBlibsndfile.a in Frameworks */,
+ 7759955312FDE20A00603187 /* Accelerate.framework in Frameworks */,
+ 774770CF12FDE7EB007449B3 /* scUBlibsndfile.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -931,6 +934,7 @@
children = (
77597AEA1123320700D2A968 /* libsndfile_iphone.a */,
77597AEF1123323800D2A968 /* scUBlibsndfile.a */,
+ 7759955212FDE20A00603187 /* Accelerate.framework */,
77BA5222129C371F00CE89DD /* CFNetwork.framework */,
77BA5233129C373400CE89DD /* CoreFoundation.framework */,
77BA5235129C373B00CE89DD /* CoreGraphics.framework */,
@@ -1134,10 +1138,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
- GCC_PREPROCESSOR_DEFINITIONS = (
- SC_IPHONE,
- SC_FFT_GREEN,
- );
+ GCC_PREPROCESSOR_DEFINITIONS = SC_IPHONE;
GCC_THUMB_SUPPORT = NO;
GCC_VERSION = 4.2;
INFOPLIST_FILE = "iPhone Resources/SuperCollider.plist";
@@ -1174,7 +1175,6 @@
GCC_PREPROCESSOR_DEFINITIONS = (
SC_IPHONE,
NDEBUG,
- SC_FFT_GREEN,
);
GCC_SYMBOLS_PRIVATE_EXTERN = YES;
GCC_THUMB_SUPPORT = NO;
Oops, something went wrong.

0 comments on commit f7e0875

Please sign in to comment.