[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] SF.net SVN: supercollider:[8084] trunk/Source/plugins



Revision: 8084
          http://supercollider.svn.sourceforge.net/supercollider/?rev=8084&view=rev
Author:   danstowell
Date:     2008-12-08 22:06:52 +0000 (Mon, 08 Dec 2008)

Log Message:
-----------
more tweaks for MSVC compiler, which doesn't provide hypotf so we need to provide for it using _hypot.

Modified Paths:
--------------
    trunk/Source/plugins/BinaryOpUGens.cpp
    trunk/Source/plugins/DemandUGens.cpp
    trunk/Source/plugins/FilterUGens.cpp

Modified: trunk/Source/plugins/BinaryOpUGens.cpp
===================================================================
--- trunk/Source/plugins/BinaryOpUGens.cpp	2008-12-08 22:01:14 UTC (rev 8083)
+++ trunk/Source/plugins/BinaryOpUGens.cpp	2008-12-08 22:06:52 UTC (rev 8084)
@@ -21,6 +21,12 @@
 
 #include "SC_PlugIn.h"
 
+#ifdef _MSC_VER
+// MS libs prefer _hypot rather than hypot, and don't provide hypotf
+#define hypot _hypot
+#define hypotf (float)_hypot
+#endif
+
 static InterfaceTable *ft;
 
 //////////////////////////////////////////////////////////////////////////////////////////////////

Modified: trunk/Source/plugins/DemandUGens.cpp
===================================================================
--- trunk/Source/plugins/DemandUGens.cpp	2008-12-08 22:01:14 UTC (rev 8083)
+++ trunk/Source/plugins/DemandUGens.cpp	2008-12-08 22:06:52 UTC (rev 8084)
@@ -2145,7 +2145,7 @@
 					return;
 			}
 			phase = x;
-			float val = DEMANDINPUT_A(2, inNumSamples);
+			val = DEMANDINPUT_A(2, inNumSamples);
 			if (sc_isnan(val)) {
 					OUT0(0) = NAN;
 					return;	

Modified: trunk/Source/plugins/FilterUGens.cpp
===================================================================
--- trunk/Source/plugins/FilterUGens.cpp	2008-12-08 22:01:14 UTC (rev 8083)
+++ trunk/Source/plugins/FilterUGens.cpp	2008-12-08 22:06:52 UTC (rev 8084)
@@ -4162,7 +4162,7 @@
 	float *in = IN(0);
 	float *out = OUT(0);
 	for (int i=0; i<inNumSamples; ++i) {
-		float val = fabs(*in++); 
+		val = fabs(*in++); 
 		if (val > thresh) {
 			counter = 0;
 			*out++ = 0.f;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

_______________________________________________
sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/