diff --git a/externals/iem/iem_spec2/src/VC6/iem_spec2.dsp b/externals/iem/iem_spec2/src/VC6/iem_spec2.dsp new file mode 100644 index 0000000000000000000000000000000000000000..1bf63c1113e250d1f7c4bf8007285d1e549fe94a --- /dev/null +++ b/externals/iem/iem_spec2/src/VC6/iem_spec2.dsp @@ -0,0 +1,85 @@ +# Microsoft Developer Studio Project File - Name="iem_spec2" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** NICHT BEARBEITEN ** + +# TARGTYPE "Win32 (x86) External Target" 0x0106 + +CFG=iem_spec2 - Win32 Debug +!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE +!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl +!MESSAGE +!MESSAGE NMAKE /f "iem_spec2.mak". +!MESSAGE +!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben +!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel: +!MESSAGE +!MESSAGE NMAKE /f "iem_spec2.mak" CFG="iem_spec2 - Win32 Debug" +!MESSAGE +!MESSAGE Für die Konfiguration stehen zur Auswahl: +!MESSAGE +!MESSAGE "iem_spec2 - Win32 Release" (basierend auf "Win32 (x86) External Target") +!MESSAGE "iem_spec2 - Win32 Debug" (basierend auf "Win32 (x86) External Target") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" + +!IF "$(CFG)" == "iem_spec2 - Win32 Release" + +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Cmd_Line "NMAKE /f makefile_win" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "makefile_win.exe" +# PROP BASE Bsc_Name "makefile_win.bsc" +# PROP BASE Target_Dir "" +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Cmd_Line "NMAKE /f makefile_win" +# PROP Rebuild_Opt "/a" +# PROP Target_File "iem_spec2.exe" +# PROP Bsc_Name "iem_spec2.bsc" +# PROP Target_Dir "" + +!ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" + +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Cmd_Line "NMAKE /f makefile_win" +# PROP BASE Rebuild_Opt "/a" +# PROP BASE Target_File "makefile_win.exe" +# PROP BASE Bsc_Name "makefile_win.bsc" +# PROP BASE Target_Dir "" +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Cmd_Line "NMAKE /f makefile_win" +# PROP Rebuild_Opt "/a" +# PROP Target_File "iem_spec2.exe" +# PROP Bsc_Name "iem_spec2.bsc" +# PROP Target_Dir "" + +!ENDIF + +# Begin Target + +# Name "iem_spec2 - Win32 Release" +# Name "iem_spec2 - Win32 Debug" + +!IF "$(CFG)" == "iem_spec2 - Win32 Release" + +!ELSEIF "$(CFG)" == "iem_spec2 - Win32 Debug" + +!ENDIF + +# Begin Source File + +SOURCE=.\makefile_win +# End Source File +# End Target +# End Project diff --git a/externals/iem/iem_spec2/src/VC6/iem_spec2.dsw b/externals/iem/iem_spec2/src/VC6/iem_spec2.dsw new file mode 100644 index 0000000000000000000000000000000000000000..0434831a8071ba355d0bde923ba476b628a6ee29 --- /dev/null +++ b/externals/iem/iem_spec2/src/VC6/iem_spec2.dsw @@ -0,0 +1,29 @@ +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GELÖSCHT WERDEN! + +############################################################################### + +Project: "iem_spec2"=.\iem_spec2.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/externals/iem/iem_spec2/src/VC6/makefile_win b/externals/iem/iem_spec2/src/VC6/makefile_win new file mode 100644 index 0000000000000000000000000000000000000000..ad427e275475455bdadd69eb3bd1bec137a51d6b --- /dev/null +++ b/externals/iem/iem_spec2/src/VC6/makefile_win @@ -0,0 +1,59 @@ + +all: ..\iem_spec2.dll + +VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio\Vc98" + +PD_INST_PATH = "C:\Programme\pd" + +PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include + +PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -DPA_LITTLE_ENDIAN + +PD_WIN_L_FLAGS = /nologo + +PD_WIN_LIB = /NODEFAULTLIB:libc /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel /NODEFAULTLIB:uuid \ + $(VIS_CPP_PATH)\lib\libc.lib \ + $(VIS_CPP_PATH)\lib\oldnames.lib \ + $(VIS_CPP_PATH)\lib\kernel32.lib \ + $(VIS_CPP_PATH)\lib\wsock32.lib \ + $(VIS_CPP_PATH)\lib\winmm.lib \ + $(PD_INST_PATH)\bin\pd.lib + + +SRC = spec2_1p1z_freq~.c \ + spec2_1p1z_time~.c \ + spec2_abs~.c \ + spec2_add_scalar~.c \ + spec2_add~.c \ + spec2_block_delay~.c \ + spec2_clip_max~.c \ + spec2_clip_min~.c \ + spec2_dbtopow~.c \ + spec2_dbtorms~.c \ + spec2_matrix_bundle_stat~.c \ + spec2_mul_scalar~.c \ + spec2_mul~.c \ + spec2_powtodb~.c \ + spec2_rmstodb~.c \ + spec2_shift~.c \ + spec2_sqrt~.c \ + spec2_stretch~.c \ + spec2_sub~.c \ + spec2_sum~.c \ + spec2_tab_conv~.c \ + spec2_tabreceive_enable~.c \ + spec2_tabreceive~.c \ + iem_spec2.c + + +OBJ = $(SRC:.c=.obj) + +.c.obj: + cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c + +..\iem_spec2.dll: $(OBJ) + link $(PD_WIN_L_FLAGS) /dll /export:iem_spec2_setup \ + /out:..\iem_spec2.dll $(OBJ) $(PD_WIN_LIB) + +clean: + del *.obj diff --git a/externals/iem/iem_spec2/src/VC7/iem_spec2.vcproj b/externals/iem/iem_spec2/src/VC7/iem_spec2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..8f507df2a5d8daaee88266264d3be459d1458397 --- /dev/null +++ b/externals/iem/iem_spec2/src/VC7/iem_spec2.vcproj @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="iem_spec2" + ProjectGUID="{6A44952F-0D55-44EE-9032-928368583BEC}" + SccProjectName="" + SccLocalPath="" + Keyword="MakeFileProj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc7proj" + ReBuildCommandLine="NMAKE /f makefile_vc7proj /a" + Output="iem_spec2.exe"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="0" + ATLMinimizesCRunTimeLibraryUsage="FALSE"> + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc7proj" + ReBuildCommandLine="NMAKE /f makefile_vc7proj /a" + Output="iem_spec2.exe"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="iem_spec2.bsc"> + </File> + <File + RelativePath="makefile_vc7proj"> + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/iem/iem_spec2/src/VC7/makefile_vc7proj b/externals/iem/iem_spec2/src/VC7/makefile_vc7proj new file mode 100644 index 0000000000000000000000000000000000000000..8dce1707f039df287a3eef55705523724d672f7b --- /dev/null +++ b/externals/iem/iem_spec2/src/VC7/makefile_vc7proj @@ -0,0 +1,54 @@ +TARGET = iem_spec2 + +all: ..\$(TARGET).dll + +VIS_CPP_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7" +VIS_SDK_PATH = "C:\Programme\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK" +PD_INST_PATH = "C:\Programme\pd-0.42-5" +PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include +PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS +PD_WIN_L_FLAGS = /nologo + +PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ + $(VIS_CPP_PATH)\lib\libcmt.lib \ + $(VIS_CPP_PATH)\lib\oldnames.lib \ + $(VIS_SDK_PATH)\lib\kernel32.lib \ + $(PD_INST_PATH)\bin\pd.lib + +SRC = spec2_1p1z_freq~.c \ + spec2_1p1z_time~.c \ + spec2_abs~.c \ + spec2_add_scalar~.c \ + spec2_add~.c \ + spec2_block_delay~.c \ + spec2_clip_max~.c \ + spec2_clip_min~.c \ + spec2_dbtopow~.c \ + spec2_dbtorms~.c \ + spec2_matrix_bundle_stat~.c \ + spec2_mul_scalar~.c \ + spec2_mul~.c \ + spec2_powtodb~.c \ + spec2_rmstodb~.c \ + spec2_shift~.c \ + spec2_sqrt~.c \ + spec2_stretch~.c \ + spec2_sub~.c \ + spec2_sum~.c \ + spec2_tab_conv~.c \ + spec2_tabreceive_enable~.c \ + spec2_tabreceive~.c \ + iem_spec2.c + + +OBJ = $(SRC:.c=.obj) + +.c.obj: + cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c + +..\$(TARGET).dll: $(OBJ) + link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ + /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) + +clean: + del *.obj diff --git a/externals/iem/iem_spec2/src/VC9/iem_spec2.sln b/externals/iem/iem_spec2/src/VC9/iem_spec2.sln new file mode 100644 index 0000000000000000000000000000000000000000..f4b9113b46cf1303308c69abf883efd1601d785f --- /dev/null +++ b/externals/iem/iem_spec2/src/VC9/iem_spec2.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_spec2", "iem_spec2.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/externals/iem/iem_spec2/src/VC9/iem_spec2.vcproj b/externals/iem/iem_spec2/src/VC9/iem_spec2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..24243119e3b6f11ec12ce11c1b01da14a526c268 --- /dev/null +++ b/externals/iem/iem_spec2/src/VC9/iem_spec2.vcproj @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="iem_spec2" + ProjectGUID="{6A44952F-0D55-44EE-9032-928368583BEC}" + Keyword="MakeFileProj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="0" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc9proj" + ReBuildCommandLine="NMAKE /f makefile_vc9proj /a" + CleanCommandLine="" + Output="iem_spec2.exe" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="0" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc9proj" + ReBuildCommandLine="NMAKE /f makefile_vc9proj /a" + CleanCommandLine="" + Output="iem_spec2.exe" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="iem_spec2.bsc" + > + </File> + <File + RelativePath="makefile_vc9proj" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/iem/iem_spec2/src/VC9/makefile_vc9proj b/externals/iem/iem_spec2/src/VC9/makefile_vc9proj new file mode 100644 index 0000000000000000000000000000000000000000..e2e8205694db3515f49e1d551615d93db435cc9a --- /dev/null +++ b/externals/iem/iem_spec2/src/VC9/makefile_vc9proj @@ -0,0 +1,53 @@ +TARGET = iem_spec2 + +all: ..\$(TARGET).dll + +VIS_CPP_PATH = "C:\Program Files\Microsoft Visual Studio 9.0\VC" +VIS_SDK_PATH = "C:\Program Files\Microsoft SDKs\Windows\v6.0A" +PD_INST_PATH = "C:\Program Files\pd-0.43.0" +PD_WIN_INCLUDE_PATH = /I. /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include +PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /Ox -D_CRT_SECURE_NO_WARNINGS +PD_WIN_L_FLAGS = /nologo + +PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ + $(VIS_CPP_PATH)\lib\libcmt.lib \ + $(VIS_CPP_PATH)\lib\oldnames.lib \ + $(VIS_SDK_PATH)\lib\kernel32.lib \ + $(PD_INST_PATH)\bin\pd.lib + +SRC = spec2_1p1z_freq~.c \ + spec2_1p1z_time~.c \ + spec2_abs~.c \ + spec2_add_scalar~.c \ + spec2_add~.c \ + spec2_block_delay~.c \ + spec2_clip_max~.c \ + spec2_clip_min~.c \ + spec2_dbtopow~.c \ + spec2_dbtorms~.c \ + spec2_matrix_bundle_stat~.c \ + spec2_mul_scalar~.c \ + spec2_mul~.c \ + spec2_powtodb~.c \ + spec2_rmstodb~.c \ + spec2_shift~.c \ + spec2_sqrt~.c \ + spec2_stretch~.c \ + spec2_sub~.c \ + spec2_sum~.c \ + spec2_tab_conv~.c \ + spec2_tabreceive_enable~.c \ + spec2_tabreceive~.c \ + iem_spec2.c + +OBJ = $(SRC:.c=.obj) + +.c.obj: + cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c + +..\$(TARGET).dll: $(OBJ) + link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ + /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) + +clean: + del *.obj diff --git a/externals/iem/iem_spec2/src/iem_spec2.sln b/externals/iem/iem_spec2/src/iem_spec2.sln new file mode 100644 index 0000000000000000000000000000000000000000..f4b9113b46cf1303308c69abf883efd1601d785f --- /dev/null +++ b/externals/iem/iem_spec2/src/iem_spec2.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "iem_spec2", "iem_spec2.vcproj", "{6A44952F-0D55-44EE-9032-928368583BEC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.ActiveCfg = Debug|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Debug|Win32.Build.0 = Debug|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.ActiveCfg = Release|Win32 + {6A44952F-0D55-44EE-9032-928368583BEC}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/externals/iem/iem_spec2/src/iem_spec2.vcproj b/externals/iem/iem_spec2/src/iem_spec2.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..24243119e3b6f11ec12ce11c1b01da14a526c268 --- /dev/null +++ b/externals/iem/iem_spec2/src/iem_spec2.vcproj @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="iem_spec2" + ProjectGUID="{6A44952F-0D55-44EE-9032-928368583BEC}" + Keyword="MakeFileProj" + TargetFrameworkVersion="131072" + > + <Platforms> + <Platform + Name="Win32" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory=".\Debug" + IntermediateDirectory=".\Debug" + ConfigurationType="0" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc9proj" + ReBuildCommandLine="NMAKE /f makefile_vc9proj /a" + CleanCommandLine="" + Output="iem_spec2.exe" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory=".\Release" + IntermediateDirectory=".\Release" + ConfigurationType="0" + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + ATLMinimizesCRunTimeLibraryUsage="false" + > + <Tool + Name="VCNMakeTool" + BuildCommandLine="NMAKE /f makefile_vc9proj" + ReBuildCommandLine="NMAKE /f makefile_vc9proj /a" + CleanCommandLine="" + Output="iem_spec2.exe" + PreprocessorDefinitions="" + IncludeSearchPath="" + ForcedIncludes="" + AssemblySearchPath="" + ForcedUsingAssemblies="" + CompileAsManaged="" + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <File + RelativePath="iem_spec2.bsc" + > + </File> + <File + RelativePath="makefile_vc9proj" + > + </File> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/externals/iem/iem_spec2/src/iemlib.h b/externals/iem/iem_spec2/src/iemlib.h index 97b088bab37b67d9eb7487855d98c74ae29e6305..ac1ffced384955b34e5156eb8d45b9c18352bafe 100644 --- a/externals/iem/iem_spec2/src/iemlib.h +++ b/externals/iem/iem_spec2/src/iemlib.h @@ -1,12 +1,13 @@ /* For information on usage and redistribution, and for a DISCLAIMER OF ALL * WARRANTIES, see the file, "LICENSE.txt," in this distribution. -iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */ +iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2012 */ #ifndef __IEMLIB_H__ #define __IEMLIB_H__ +#define IS_A_NULL(atom,index) ((atom+index)->a_type == A_NULL) #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) @@ -15,6 +16,8 @@ iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 * #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) +#define SETNULL(atom) ((atom)->a_type = A_NULL) + /* now miller's code starts : for 4 point interpolation for lookup tables @@ -53,11 +56,11 @@ extern int sys_noloadbang; #define int32 long #endif /* MSW */ -#if defined(__FreeBSD__) || defined(__APPLE__) +#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__FreeBSD_kernel__) #include <machine/endian.h> #endif -#ifdef __linux__ +#if defined(__linux__) || defined(__CYGWIN__) || defined(__GNU__) || defined(ANDROID) #include <endian.h> #endif @@ -100,7 +103,7 @@ union tabfudge_f #endif /* on 64bit systems we cannot use garray_getfloatarray... */ -#if (defined __x86_64__) +#if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 40)) # define iemarray_t t_word # define iemarray_getarray garray_getfloatwords # define iemarray_getfloat(pointer, index) (pointer[index].w_float) @@ -112,5 +115,4 @@ union tabfudge_f # define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue) #endif - #endif diff --git a/externals/iem/iem_spec2/src/makefile_vc9proj b/externals/iem/iem_spec2/src/makefile_vc9proj new file mode 100644 index 0000000000000000000000000000000000000000..1d07adb0d1dacb7c551fa88cfedda3dbacb8da56 --- /dev/null +++ b/externals/iem/iem_spec2/src/makefile_vc9proj @@ -0,0 +1,54 @@ +TARGET = iem_spec2 + +all: ..\$(TARGET).dll + +VIS_CPP_PATH = "$(PROGRAMFILES)\Microsoft Visual Studio 9.0\VC" +VIS_SDK_PATH = "$(PROGRAMFILES)\Microsoft SDKs\Windows\v6.0A" +PD_INST_PATH = "$(PROGRAMFILES)\pd" +PD_WIN_INCLUDE_PATH = /I. /I..\..\include /I$(PD_INST_PATH)\src /I$(VIS_CPP_PATH)\include +PD_WIN_C_FLAGS = /nologo /W3 /WX /DMSW /DNT /DPD /DWIN32 /DWINDOWS /DHAVE_G_CANVAS_H /Ox -D_CRT_SECURE_NO_WARNINGS +PD_WIN_L_FLAGS = /nologo + +PD_WIN_LIB = /NODEFAULTLIB:libcmt /NODEFAULTLIB:oldnames /NODEFAULTLIB:kernel32 \ + $(VIS_CPP_PATH)\lib\libcmt.lib \ + $(VIS_CPP_PATH)\lib\oldnames.lib \ + $(VIS_SDK_PATH)\lib\kernel32.lib \ + $(PD_INST_PATH)\bin\pd.lib + +SRC = spec2_1p1z_freq~.c \ + spec2_1p1z_time~.c \ + spec2_abs~.c \ + spec2_add_scalar~.c \ + spec2_add~.c \ + spec2_block_delay~.c \ + spec2_clip_max~.c \ + spec2_clip_min~.c \ + spec2_dbtopow~.c \ + spec2_dbtorms~.c \ + spec2_matrix_bundle_stat~.c \ + spec2_mul_scalar~.c \ + spec2_mul~.c \ + spec2_powtodb~.c \ + spec2_rmstodb~.c \ + spec2_shift~.c \ + spec2_sqrt~.c \ + spec2_stretch~.c \ + spec2_sub~.c \ + spec2_sum~.c \ + spec2_tab_conv~.c \ + spec2_tabreceive_enable~.c \ + spec2_tabreceive~.c \ + $(TARGET).c + + +OBJ = $(SRC:.c=.obj) + +.c.obj: + cl $(PD_WIN_C_FLAGS) $(PD_WIN_INCLUDE_PATH) /c $*.c + +..\$(TARGET).dll: $(OBJ) + link $(PD_WIN_L_FLAGS) /dll /export:$(TARGET)_setup \ + /out:..\$(TARGET).dll $(OBJ) $(PD_WIN_LIB) + +clean: + del *.obj diff --git a/externals/iem/iem_spec2/src/spec2_1p1z_freq~.c b/externals/iem/iem_spec2/src/spec2_1p1z_freq~.c index 0655f168325749ba92bac35adc5e9bb1a4794fef..6d95a864968743f6f4f5e5b37eb8eb4778f21ff3 100644 --- a/externals/iem/iem_spec2/src/spec2_1p1z_freq~.c +++ b/externals/iem/iem_spec2/src/spec2_1p1z_freq~.c @@ -498,7 +498,7 @@ void spec2_1p1z_freq_tilde_setup(void) spec2_1p1z_freq_tilde_class = class_new(gensym("spec2_1p1z_freq~"), (t_newmethod)spec2_1p1z_freq_tilde_new, (t_method)spec2_1p1z_freq_tilde_free, sizeof(t_spec2_1p1z_freq_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_1p1z_freq_tilde_class, t_spec2_1p1z_freq_tilde, x_msi); - class_addmethod(spec2_1p1z_freq_tilde_class, (t_method)spec2_1p1z_freq_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_1p1z_freq_tilde_class, (t_method)spec2_1p1z_freq_tilde_dsp, gensym("dsp"), 0); class_addlist(spec2_1p1z_freq_tilde_class, (t_method)spec2_1p1z_freq_tilde_list); // class_sethelpsymbol(spec2_1p1z_freq_tilde_class, gensym("iemhelp2/spec2_1p1z_freq~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_1p1z_time~.c b/externals/iem/iem_spec2/src/spec2_1p1z_time~.c index 8d2dd1cdd2f0525898c7d456009a74b9bb3278e7..852ea990853091e6347c382d1b87082c4651791f 100644 --- a/externals/iem/iem_spec2/src/spec2_1p1z_time~.c +++ b/externals/iem/iem_spec2/src/spec2_1p1z_time~.c @@ -210,6 +210,6 @@ void spec2_1p1z_time_tilde_setup(void) sizeof(t_spec2_1p1z_time_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_1p1z_time_tilde_class, t_spec2_1p1z_time_tilde, x_msi); class_addlist(spec2_1p1z_time_tilde_class, (t_method)spec2_1p1z_time_tilde_list); - class_addmethod(spec2_1p1z_time_tilde_class, (t_method)spec2_1p1z_time_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_1p1z_time_tilde_class, (t_method)spec2_1p1z_time_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_1p1z_time_tilde_class, gensym("iemhelp2/spec2_1p1z_time~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_abs~.c b/externals/iem/iem_spec2/src/spec2_abs~.c index f3664bd2463b922223aeecb11fd2ea1dbffe9a3d..521b0e0f92b2356c6c6743a847064a0aea4edf58 100644 --- a/externals/iem/iem_spec2/src/spec2_abs~.c +++ b/externals/iem/iem_spec2/src/spec2_abs~.c @@ -87,6 +87,6 @@ void spec2_abs_tilde_setup(void) spec2_abs_tilde_class = class_new(gensym("spec2_abs~"), (t_newmethod)spec2_abs_tilde_new, 0, sizeof(t_spec2_abs_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_abs_tilde_class, t_spec2_abs_tilde, x_msi); - class_addmethod(spec2_abs_tilde_class, (t_method)spec2_abs_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_abs_tilde_class, (t_method)spec2_abs_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_abs_tilde_class, gensym("iemhelp2/spec2_abs~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_add_scalar~.c b/externals/iem/iem_spec2/src/spec2_add_scalar~.c index 7a849fcddc7614b98875f1fc96f77fb755bd0f3c..219baeefc589f1c22799fbb2d1e75001ef5fa970 100644 --- a/externals/iem/iem_spec2/src/spec2_add_scalar~.c +++ b/externals/iem/iem_spec2/src/spec2_add_scalar~.c @@ -101,6 +101,6 @@ void spec2_add_scalar_tilde_setup(void) class_addcreator((t_newmethod)spec2_add_scalar_tilde_new, gensym("spec2+s~"), A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_add_scalar_tilde_class, t_spec2_add_scalar_tilde, x_msi); class_addmethod(spec2_add_scalar_tilde_class, (t_method)spec2_add_scalar_tilde_ft1, gensym("ft1"), A_FLOAT, 0); - class_addmethod(spec2_add_scalar_tilde_class, (t_method)spec2_add_scalar_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_add_scalar_tilde_class, (t_method)spec2_add_scalar_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_add_scalar_tilde_class, gensym("iemhelp2/spec2_add_scalar~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_add~.c b/externals/iem/iem_spec2/src/spec2_add~.c index e9cfbb0f9cd16f68ec3b05b4e3b80ca97932e08c..cfb7249f6b8825b34f3261bb4aeb2c88690eadcb 100644 --- a/externals/iem/iem_spec2/src/spec2_add~.c +++ b/externals/iem/iem_spec2/src/spec2_add~.c @@ -96,6 +96,6 @@ void spec2_add_tilde_setup(void) sizeof(t_spec2_add_tilde), 0, 0); class_addcreator((t_newmethod)spec2_add_tilde_new, gensym("spec2+~"), 0); CLASS_MAINSIGNALIN(spec2_add_tilde_class, t_spec2_add_tilde, x_msi); - class_addmethod(spec2_add_tilde_class, (t_method)spec2_add_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_add_tilde_class, (t_method)spec2_add_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_add_tilde_class, gensym("iemhelp2/spec2_add~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_block_delay~.c b/externals/iem/iem_spec2/src/spec2_block_delay~.c index cd1bba4993859aeeae0b4bb365267a280c8e2328..5c52b28638c812841288034c554a2d505b9bbc72 100644 --- a/externals/iem/iem_spec2/src/spec2_block_delay~.c +++ b/externals/iem/iem_spec2/src/spec2_block_delay~.c @@ -152,6 +152,6 @@ void spec2_block_delay_tilde_setup(void) spec2_block_delay_tilde_class = class_new(gensym("spec2_block_delay~"), (t_newmethod)spec2_block_delay_tilde_new, (t_method)spec2_block_delay_tilde_free, sizeof(t_spec2_block_delay_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_block_delay_tilde_class, t_spec2_block_delay_tilde, x_msi); - class_addmethod(spec2_block_delay_tilde_class, (t_method)spec2_block_delay_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_block_delay_tilde_class, (t_method)spec2_block_delay_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_block_delay_tilde_class, gensym("iemhelp2/spec2_block_delay~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_clip_max~.c b/externals/iem/iem_spec2/src/spec2_clip_max~.c index f21a43cec47ca646cb14857b72b8f5f52c3a243f..2aebcdc64e92108af223baa19ed8452df89f2776 100644 --- a/externals/iem/iem_spec2/src/spec2_clip_max~.c +++ b/externals/iem/iem_spec2/src/spec2_clip_max~.c @@ -162,6 +162,6 @@ void spec2_clip_max_tilde_setup(void) spec2_clip_max_tilde_class = class_new(gensym("spec2_clip_max~"), (t_newmethod)spec2_clip_max_tilde_new, (t_method)spec2_clip_max_tilde_free, sizeof(t_spec2_clip_max_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_clip_max_tilde_class, t_spec2_clip_max_tilde, x_msi); - class_addmethod(spec2_clip_max_tilde_class, (t_method)spec2_clip_max_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_clip_max_tilde_class, (t_method)spec2_clip_max_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_clip_max_tilde_class, gensym("iemhelp2/spec2_clip_max~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_clip_min~.c b/externals/iem/iem_spec2/src/spec2_clip_min~.c index 72fce1de8dd124a1ebab242fda87572144058b1e..ccdbf12cb4ae9add83e07359f69a73243fceb017 100644 --- a/externals/iem/iem_spec2/src/spec2_clip_min~.c +++ b/externals/iem/iem_spec2/src/spec2_clip_min~.c @@ -162,6 +162,6 @@ void spec2_clip_min_tilde_setup(void) spec2_clip_min_tilde_class = class_new(gensym("spec2_clip_min~"), (t_newmethod)spec2_clip_min_tilde_new, (t_method)spec2_clip_min_tilde_free, sizeof(t_spec2_clip_min_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_clip_min_tilde_class, t_spec2_clip_min_tilde, x_msi); - class_addmethod(spec2_clip_min_tilde_class, (t_method)spec2_clip_min_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_clip_min_tilde_class, (t_method)spec2_clip_min_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_clip_min_tilde_class, gensym("iemhelp2/spec2_clip_min~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_dbtopow~.c b/externals/iem/iem_spec2/src/spec2_dbtopow~.c index 6efae54fcb115410e1cfea4be61b3d9fd0933715..e780af45b5afb09fd4a1cf8c14a2abbbf335593b 100644 --- a/externals/iem/iem_spec2/src/spec2_dbtopow~.c +++ b/externals/iem/iem_spec2/src/spec2_dbtopow~.c @@ -62,6 +62,6 @@ void spec2_dbtopow_tilde_setup(void) spec2_dbtopow_tilde_class = class_new(gensym("spec2_dbtopow~"), (t_newmethod)spec2_dbtopow_tilde_new, 0, sizeof(t_spec2_dbtopow_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_dbtopow_tilde_class, t_spec2_dbtopow_tilde, x_msi); - class_addmethod(spec2_dbtopow_tilde_class, (t_method)spec2_dbtopow_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_dbtopow_tilde_class, (t_method)spec2_dbtopow_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_dbtopow_tilde_class, gensym("iemhelp2/spec2_dbtopow~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_dbtorms~.c b/externals/iem/iem_spec2/src/spec2_dbtorms~.c index a5f5199d9299b2223fe7d72ae6338f7aae82652b..b89ff9b491aaeffb12158b2f7edabd75b3adf22b 100644 --- a/externals/iem/iem_spec2/src/spec2_dbtorms~.c +++ b/externals/iem/iem_spec2/src/spec2_dbtorms~.c @@ -62,6 +62,6 @@ void spec2_dbtorms_tilde_setup(void) spec2_dbtorms_tilde_class = class_new(gensym("spec2_dbtorms~"), (t_newmethod)spec2_dbtorms_tilde_new, 0, sizeof(t_spec2_dbtorms_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_dbtorms_tilde_class, t_spec2_dbtorms_tilde, x_msi); - class_addmethod(spec2_dbtorms_tilde_class, (t_method)spec2_dbtorms_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_dbtorms_tilde_class, (t_method)spec2_dbtorms_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_dbtorms_tilde_class, gensym("iemhelp2/spec2_dbtorms~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_matrix_bundle_stat~.c b/externals/iem/iem_spec2/src/spec2_matrix_bundle_stat~.c index 72624fd975fedb554444f935e0c50a7b538b95d1..b4efea449d783276efd34b813bad1feabc165c3f 100644 --- a/externals/iem/iem_spec2/src/spec2_matrix_bundle_stat~.c +++ b/externals/iem/iem_spec2/src/spec2_matrix_bundle_stat~.c @@ -277,7 +277,7 @@ void spec2_matrix_bundle_stat_tilde_setup(void) spec2_matrix_bundle_stat_tilde_class = class_new(gensym("spec2_matrix_bundle_stat~"), (t_newmethod)spec2_matrix_bundle_stat_tilde_new, (t_method)spec2_matrix_bundle_stat_tilde_free, sizeof(t_spec2_matrix_bundle_stat_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_matrix_bundle_stat_tilde_class, t_spec2_matrix_bundle_stat_tilde, x_msi); - class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_dsp, gensym("dsp"), 0); class_addlist(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_list); class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_element, gensym("element"), A_GIMME, 0); class_addmethod(spec2_matrix_bundle_stat_tilde_class, (t_method)spec2_matrix_bundle_stat_tilde_bundle, gensym("bundle"), A_GIMME, 0); diff --git a/externals/iem/iem_spec2/src/spec2_mul_scalar~.c b/externals/iem/iem_spec2/src/spec2_mul_scalar~.c index 941d9e7c1e3f5448a601b57d1dfd30c741f9dc0c..3ff5a7e52d7144d55c6710f4098345fd486615de 100644 --- a/externals/iem/iem_spec2/src/spec2_mul_scalar~.c +++ b/externals/iem/iem_spec2/src/spec2_mul_scalar~.c @@ -100,6 +100,6 @@ void spec2_mul_scalar_tilde_setup(void) class_addcreator((t_newmethod)spec2_mul_scalar_tilde_new, gensym("spec2*s~"), A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_mul_scalar_tilde_class, t_spec2_mul_scalar_tilde, x_msi); class_addmethod(spec2_mul_scalar_tilde_class, (t_method)spec2_mul_scalar_tilde_ft1, gensym("ft1"), A_FLOAT, 0); - class_addmethod(spec2_mul_scalar_tilde_class, (t_method)spec2_mul_scalar_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_mul_scalar_tilde_class, (t_method)spec2_mul_scalar_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_mul_scalar_tilde_class, gensym("iemhelp2/spec2_mul_scalar~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_mul~.c b/externals/iem/iem_spec2/src/spec2_mul~.c index 2d7d753acc73a9c1426a3ef40726e511ddef2b53..97b8605a5920441fd40a5c93e0abc87735b98bf8 100644 --- a/externals/iem/iem_spec2/src/spec2_mul~.c +++ b/externals/iem/iem_spec2/src/spec2_mul~.c @@ -95,6 +95,6 @@ void spec2_mul_tilde_setup(void) sizeof(t_spec2_mul_tilde), 0, 0); class_addcreator((t_newmethod)spec2_mul_tilde_new, gensym("spec2*~"), 0); CLASS_MAINSIGNALIN(spec2_mul_tilde_class, t_spec2_mul_tilde, x_msi); - class_addmethod(spec2_mul_tilde_class, (t_method)spec2_mul_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_mul_tilde_class, (t_method)spec2_mul_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_mul_tilde_class, gensym("iemhelp2/spec2_mul~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_powtodb~.c b/externals/iem/iem_spec2/src/spec2_powtodb~.c index 9099c8a472a33b46eb82fb23f5a66b47e1041c87..d9fa7cba500d0a45071b91c1e589cb4c4d9a3db8 100644 --- a/externals/iem/iem_spec2/src/spec2_powtodb~.c +++ b/externals/iem/iem_spec2/src/spec2_powtodb~.c @@ -61,6 +61,6 @@ void spec2_powtodb_tilde_setup(void) spec2_powtodb_tilde_class = class_new(gensym("spec2_powtodb~"), (t_newmethod)spec2_powtodb_tilde_new, 0, sizeof(t_spec2_powtodb_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_powtodb_tilde_class, t_spec2_powtodb_tilde, x_msi); - class_addmethod(spec2_powtodb_tilde_class, (t_method)spec2_powtodb_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_powtodb_tilde_class, (t_method)spec2_powtodb_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_powtodb_tilde_class, gensym("iemhelp2/spec2_powtodb~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_rmstodb~.c b/externals/iem/iem_spec2/src/spec2_rmstodb~.c index 57dc92c5f5b52d732a4f895e9d94ce1550f61b8a..0bba8e3b93a140425362a29dfd119076a0b6319f 100644 --- a/externals/iem/iem_spec2/src/spec2_rmstodb~.c +++ b/externals/iem/iem_spec2/src/spec2_rmstodb~.c @@ -62,6 +62,6 @@ void spec2_rmstodb_tilde_setup(void) spec2_rmstodb_tilde_class = class_new(gensym("spec2_rmstodb~"), (t_newmethod)spec2_rmstodb_tilde_new, 0, sizeof(t_spec2_rmstodb_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_rmstodb_tilde_class, t_spec2_rmstodb_tilde, x_msi); - class_addmethod(spec2_rmstodb_tilde_class, (t_method)spec2_rmstodb_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_rmstodb_tilde_class, (t_method)spec2_rmstodb_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_rmstodb_tilde_class, gensym("iemhelp2/spec2_rmstodb~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_shift~.c b/externals/iem/iem_spec2/src/spec2_shift~.c index 7c63c545ff5ac16cbfff85dc3ebb1096c28f2580..de3471e6b585f9b4799fe4bc51bce4dec89599c2 100644 --- a/externals/iem/iem_spec2/src/spec2_shift~.c +++ b/externals/iem/iem_spec2/src/spec2_shift~.c @@ -101,7 +101,7 @@ void spec2_shift_tilde_setup(void) spec2_shift_tilde_class = class_new(gensym("spec2_shift~"), (t_newmethod)spec2_shift_tilde_new, 0, sizeof(t_spec2_shift_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_shift_tilde_class, t_spec2_shift_tilde, x_msi); - class_addmethod(spec2_shift_tilde_class, (t_method)spec2_shift_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_shift_tilde_class, (t_method)spec2_shift_tilde_dsp, gensym("dsp"), 0); class_addfloat(spec2_shift_tilde_class, (t_method)spec2_shift_tilde_add); // class_sethelpsymbol(spec2_shift_tilde_class, gensym("iemhelp/spec2_shift~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_sqrt~.c b/externals/iem/iem_spec2/src/spec2_sqrt~.c index 67410c3016e909d74ff725216b8803e4728aaf49..6f25ee133e03b5cb55a4507c7a396c743655bcf5 100644 --- a/externals/iem/iem_spec2/src/spec2_sqrt~.c +++ b/externals/iem/iem_spec2/src/spec2_sqrt~.c @@ -11,32 +11,6 @@ iem_spec2 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 200 static t_class *spec2_sqrt_tilde_class; -#define SPEC2DUMTAB1SIZE 256 -#define SPEC2DUMTAB2SIZE 1024 - -static t_float spec2_rsqrt_exptab[SPEC2DUMTAB1SIZE], spec2_rsqrt_mantissatab[SPEC2DUMTAB2SIZE]; - -static void init_spec2_rsqrt(void) -{ - int i; - - for (i=0; i<SPEC2DUMTAB1SIZE; i++) - { - t_float f; - long l = (i ? (i == SPEC2DUMTAB1SIZE-1 ? SPEC2DUMTAB1SIZE-2 : i) : 1)<< 23; - - *(long *)(&f) = l; - spec2_rsqrt_exptab[i] = 1.0f/sqrt(f); - } - - for (i=0; i<SPEC2DUMTAB2SIZE; i++) - { - t_float f = 1.0f + (1.0f / (t_float)SPEC2DUMTAB2SIZE) * (t_float)i; - - spec2_rsqrt_mantissatab[i] = 1.0f / sqrt(f); - } -} - typedef struct _spec2_sqrt_tilde { t_object x_obj; @@ -50,17 +24,22 @@ static t_int *spec2_sqrt_tilde_perform(t_int *w) int n = w[3]+1; while(n--) - { - t_float f = *in; - long l = *(long *)(in++); - - if(f < 0.0f) - *out++ = 0.0f; - else - { - t_float g = spec2_rsqrt_exptab[(l >> 23) & 0xff] * spec2_rsqrt_mantissatab[(l >> 13) & 0x3ff]; - - *out++ = f*g*(1.5f - 0.5f*g*g*f); + { + t_sample f = *in++; + + if (f<0.0) + { + *out++=0.0; + } + else + { +#if ((defined PD_MAJOR_VERSION && defined PD_MINOR_VERSION) && (PD_MAJOR_VERSION > 0 || PD_MINOR_VERSION > 43)) + t_float g = q8_rsqrt(f); + + *out++ = f*g*(1.5 - 0.5 * g * g * f); +#else + *out++ = sqrt(f); +#endif } } return(w+4); @@ -84,10 +63,8 @@ static void *spec2_sqrt_tilde_new(void) void spec2_sqrt_tilde_setup(void) { - init_spec2_rsqrt(); spec2_sqrt_tilde_class = class_new(gensym("spec2_sqrt~"), (t_newmethod)spec2_sqrt_tilde_new, 0, sizeof(t_spec2_sqrt_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_sqrt_tilde_class, t_spec2_sqrt_tilde, x_msi); - class_addmethod(spec2_sqrt_tilde_class, (t_method)spec2_sqrt_tilde_dsp, gensym("dsp"), A_CANT, 0); -// class_sethelpsymbol(spec2_sqrt_tilde_class, gensym("iemhelp2/spec2_sqrt~-help")); + class_addmethod(spec2_sqrt_tilde_class, (t_method)spec2_sqrt_tilde_dsp, gensym("dsp"), 0); } diff --git a/externals/iem/iem_spec2/src/spec2_stretch~.c b/externals/iem/iem_spec2/src/spec2_stretch~.c index 6e7a580efe33e7f70edbf76e91bd24c5477dcee1..9d060af5e6c0c91be62230dc02233757549e0b38 100644 --- a/externals/iem/iem_spec2/src/spec2_stretch~.c +++ b/externals/iem/iem_spec2/src/spec2_stretch~.c @@ -99,7 +99,7 @@ void spec2_stretch_tilde_setup(void) spec2_stretch_tilde_class = class_new(gensym("spec2_stretch~"), (t_newmethod)spec2_stretch_tilde_new, 0, sizeof(t_spec2_stretch_tilde), 0, A_DEFFLOAT, 0); CLASS_MAINSIGNALIN(spec2_stretch_tilde_class, t_spec2_stretch_tilde, x_msi); - class_addmethod(spec2_stretch_tilde_class, (t_method)spec2_stretch_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_stretch_tilde_class, (t_method)spec2_stretch_tilde_dsp, gensym("dsp"), 0); class_addfloat(spec2_stretch_tilde_class, (t_method)spec2_stretch_tilde_mul); // class_sethelpsymbol(spec2_stretch_tilde_class, gensym("iemhelp/spec2_stretch~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_sub~.c b/externals/iem/iem_spec2/src/spec2_sub~.c index fd562400b8d3e07fa9f0b20d386195a3f8cb6f42..b972d4fd01b165bed6bbcdd9efe13eecf44cfe9d 100644 --- a/externals/iem/iem_spec2/src/spec2_sub~.c +++ b/externals/iem/iem_spec2/src/spec2_sub~.c @@ -95,6 +95,6 @@ void spec2_sub_tilde_setup(void) sizeof(t_spec2_sub_tilde), 0, 0); class_addcreator((t_newmethod)spec2_sub_tilde_new, gensym("spec2-~"), 0); CLASS_MAINSIGNALIN(spec2_sub_tilde_class, t_spec2_sub_tilde, x_msi); - class_addmethod(spec2_sub_tilde_class, (t_method)spec2_sub_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_sub_tilde_class, (t_method)spec2_sub_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_sub_tilde_class, gensym("iemhelp2/spec2_sub~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_sum~.c b/externals/iem/iem_spec2/src/spec2_sum~.c index b698c9bf0f3ca9daf40a79290c2836a7088750f8..796447de7f9ecfb1f809f70e825baca2371741f7 100644 --- a/externals/iem/iem_spec2/src/spec2_sum~.c +++ b/externals/iem/iem_spec2/src/spec2_sum~.c @@ -115,6 +115,6 @@ void spec2_sum_tilde_setup(void) spec2_sum_tilde_class = class_new(gensym("spec2_sum~"), (t_newmethod)spec2_sum_tilde_new, 0, sizeof(t_spec2_sum_tilde), 0, 0); CLASS_MAINSIGNALIN(spec2_sum_tilde_class, t_spec2_sum_tilde, x_msi); - class_addmethod(spec2_sum_tilde_class, (t_method)spec2_sum_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_sum_tilde_class, (t_method)spec2_sum_tilde_dsp, gensym("dsp"), 0); // class_sethelpsymbol(spec2_sum_tilde_class, gensym("iemhelp2/spec2_sum~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_tab_conv~.c b/externals/iem/iem_spec2/src/spec2_tab_conv~.c index d0666428cdf86dbc63645f136133bc24ee304b9f..d9ac5cdf5ab210c5798134bd3697da63df545718 100644 --- a/externals/iem/iem_spec2/src/spec2_tab_conv~.c +++ b/externals/iem/iem_spec2/src/spec2_tab_conv~.c @@ -143,7 +143,7 @@ void spec2_tab_conv_tilde_setup(void) spec2_tab_conv_tilde_class = class_new(gensym("spec2_tab_conv~"), (t_newmethod)spec2_tab_conv_tilde_new, (t_method)spec2_tab_conv_tilde_free, sizeof(t_spec2_tab_conv_tilde), 0, A_GIMME, 0); CLASS_MAINSIGNALIN(spec2_tab_conv_tilde_class, t_spec2_tab_conv_tilde, x_msi); - class_addmethod(spec2_tab_conv_tilde_class, (t_method)spec2_tab_conv_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_tab_conv_tilde_class, (t_method)spec2_tab_conv_tilde_dsp, gensym("dsp"), 0); class_addmethod(spec2_tab_conv_tilde_class, (t_method)spec2_tab_conv_tilde_set, gensym("set"), A_GIMME, 0); // class_sethelpsymbol(spec2_tab_conv_tilde_class, gensym("iemhelp/spec2_tab_conv~-help")); } diff --git a/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c b/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c index e2c9f243c4710c73da082e236701f531789c0180..e9f0eb06d1c213f5fbe464c9c0297f22554fb0d8 100644 --- a/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c +++ b/externals/iem/iem_spec2/src/spec2_tabreceive_enable~.c @@ -163,7 +163,7 @@ void spec2_tabreceive_enable_tilde_setup(void) { spec2_tabreceive_enable_tilde_class = class_new(gensym("spec2_tabreceive_enable~"), (t_newmethod)spec2_tabreceive_enable_tilde_new, 0, sizeof(t_spec2_tabreceive_enable_tilde), 0, A_GIMME, 0); - class_addmethod(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_dsp, gensym("dsp"), 0); class_addsymbol(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_symbol); class_addfloat(spec2_tabreceive_enable_tilde_class, (t_method)spec2_tabreceive_enable_tilde_float); // class_sethelpsymbol(spec2_tabreceive_enable_tilde_class, gensym("iemhelp2/spec2_tabreceive_enable~-help")); diff --git a/externals/iem/iem_spec2/src/spec2_tabreceive~.c b/externals/iem/iem_spec2/src/spec2_tabreceive~.c index bcc1c39cb5cc767cd38768f78ba019d10e859c09..ac30b5c56eb07492d7f57f30fe124709f1f63943 100644 --- a/externals/iem/iem_spec2/src/spec2_tabreceive~.c +++ b/externals/iem/iem_spec2/src/spec2_tabreceive~.c @@ -144,7 +144,7 @@ void spec2_tabreceive_tilde_setup(void) { spec2_tabreceive_tilde_class = class_new(gensym("spec2_tabreceive~"), (t_newmethod)spec2_tabreceive_tilde_new, 0, sizeof(t_spec2_tabreceive_tilde), 0, A_DEFSYM, 0); - class_addmethod(spec2_tabreceive_tilde_class, (t_method)spec2_tabreceive_tilde_dsp, gensym("dsp"), A_CANT, 0); + class_addmethod(spec2_tabreceive_tilde_class, (t_method)spec2_tabreceive_tilde_dsp, gensym("dsp"), 0); class_addsymbol(spec2_tabreceive_tilde_class, (t_method)spec2_tabreceive_tilde_symbol); // class_sethelpsymbol(spec2_tabreceive_tilde_class, gensym("iemhelp/spec2_tabreceive~-help")); }