diff --git a/src/WinLibs/FTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.vcproj b/src/WinLibs/FTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.vcproj
index 60a44446a..f947b134b 100644
--- a/src/WinLibs/FTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.vcproj
+++ b/src/WinLibs/FTGL/win32_vcpp/ftgl_static_lib/ftgl_static_lib.vcproj
@@ -196,7 +196,7 @@
PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug_ST/ftgl_static_lib.pch"
AssemblerListingLocation=".\Debug_ST/"
ObjectFile=".\Debug_ST/"
@@ -271,7 +271,7 @@
AdditionalIncludeDirectories=""..\..\..\freetype-2.3.5\include";..\..\include"
PreprocessorDefinitions="NDEBUG;WIN32;_LIB;FTGL_LIBRARY_STATIC"
StringPooling="true"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release_ST/ftgl_static_lib.pch"
AssemblerListingLocation=".\Release_ST/"
@@ -318,7 +318,7 @@
diff --git a/src/WinLibs/freetype-2.3.5/builds/win32/visualc/freetype.vcproj b/src/WinLibs/freetype-2.3.5/builds/win32/visualc/freetype.vcproj
index 20455cebe..6e5171f03 100644
--- a/src/WinLibs/freetype-2.3.5/builds/win32/visualc/freetype.vcproj
+++ b/src/WinLibs/freetype-2.3.5/builds/win32/visualc/freetype.vcproj
@@ -1,2155 +1,2156 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/WinLibs/glew/build/vc6/glew_static.vcproj b/src/WinLibs/glew/build/vc6/glew_static.vcproj
index 3ed22ee66..b7c136b27 100644
--- a/src/WinLibs/glew/build/vc6/glew_static.vcproj
+++ b/src/WinLibs/glew/build/vc6/glew_static.vcproj
@@ -45,7 +45,7 @@
AdditionalIncludeDirectories="../../include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;GLEW_STATIC"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
PrecompiledHeaderFile=".\static/debug/glew_static.pch"
AssemblerListingLocation=".\static/debug/"
ObjectFile=".\static/debug/"
@@ -194,7 +194,7 @@
AdditionalIncludeDirectories="../../include"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;WIN32_LEAN_AND_MEAN;VC_EXTRALEAN;GLEW_STATIC"
StringPooling="true"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\static/release/glew_static.pch"
AssemblerListingLocation=".\static/release/"
diff --git a/src/projectM-engine/PCM.cpp b/src/projectM-engine/PCM.cpp
index 668cf47cd..593169c60 100755
--- a/src/projectM-engine/PCM.cpp
+++ b/src/projectM-engine/PCM.cpp
@@ -222,6 +222,38 @@ void PCM::addPCM8( unsigned char PCMdata[2][1024])
getPCM(vdataR,512,1,1,0,0);
}
+void PCM::addPCM8_512( const unsigned char PCMdata[2][512])
+{
+ int i,j;
+ int samples=512;
+
+
+ for(i=0;imaxsamples) newsamples=maxsamples;
+ numsamples = getPCMnew(pcmdataR,1,0,waveSmoothing,0,0);
+ getPCMnew(pcmdataL,0,0,waveSmoothing,0,1);
+ getPCM(vdataL,512,0,1,0,0);
+ getPCM(vdataR,512,1,1,0,0);
+}
+
//puts sound data requested at provided pointer
//
diff --git a/src/projectM-engine/PCM.hpp b/src/projectM-engine/PCM.hpp
index dde591c89..2e00c056b 100755
--- a/src/projectM-engine/PCM.hpp
+++ b/src/projectM-engine/PCM.hpp
@@ -58,6 +58,7 @@ public:
void addPCM16(short [2][512]);
void addPCM16Data(const short* pcm_data, short samples);
void addPCM8( unsigned char [2][1024]);
+ void addPCM8_512( const unsigned char [2][512]);
void getPCM(float *data, int samples, int channel, int freq, float smoothing, int derive);
void freePCM();
int getPCMnew(float *PCMdata, int channel, int freq, float smoothing, int derive,int reset);
diff --git a/src/projectM-engine/libprojectM.vcproj b/src/projectM-engine/libprojectM.vcproj
index d8935d7a1..8d0107490 100644
--- a/src/projectM-engine/libprojectM.vcproj
+++ b/src/projectM-engine/libprojectM.vcproj
@@ -46,7 +46,7 @@
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;DEBUG;GLEW_STATIC;USE_FBO;USE_FTGL"
MinimalRebuild="true"
BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
PrecompiledHeaderFile=".\Debug/libprojectM.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
@@ -122,7 +122,7 @@
AdditionalIncludeDirectories=""..\WinLibs\freetype-2.3.5\include";"..\WinLibs\FTGL\include";"..\WinLibs\glew\include\GL""
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;GLEW_STATIC;USE_FBO; USE_FTGL"
StringPooling="true"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
PrecompiledHeaderFile=".\Release/libprojectM.pch"
AssemblerListingLocation=".\Release/"
@@ -174,11 +174,11 @@
diff --git a/src/projectM-wmp/projectM-wmp/projectM-wmp.cpp b/src/projectM-wmp/projectM-wmp/projectM-wmp.cpp
index 3ebfc77a6..15b135300 100644
--- a/src/projectM-wmp/projectM-wmp/projectM-wmp.cpp
+++ b/src/projectM-wmp/projectM-wmp/projectM-wmp.cpp
@@ -64,7 +64,6 @@ void CProjectMwmp::FinalRelease()
//////////////////////////////////////////////////////////////////////////////
STDMETHODIMP CProjectMwmp::Render(TimedLevel *pLevels, HDC hdc, RECT *prc)
{
-
if (starting) {
static PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), 1,
@@ -80,7 +79,7 @@ STDMETHODIMP CProjectMwmp::Render(TimedLevel *pLevels, HDC hdc, RECT *prc)
width = (int)(prc->right - prc->left);
height = (int)(prc->bottom - prc->top);
- globalPM = new projectM("C:\\projectM\\config.inp");//24,18,0,128,width,height,"C:\\Documents and Settings\\DEV2\\My Documents\\svn\\presets_projectM\\");
+ globalPM = new projectM("C:\\Program\ Files\\projectM\\config.inp");//24,18,0,128,width,height,"C:\\Documents and Settings\\DEV2\\My Documents\\svn\\presets_projectM\\");
}
@@ -94,6 +93,8 @@ STDMETHODIMP CProjectMwmp::Render(TimedLevel *pLevels, HDC hdc, RECT *prc)
}
globalPM->pcm->addPCM8(pLevels->waveform);
+ wglMakeCurrent(hdc, hrc);
+ globalPM->projectM_resetGL(width,height);
globalPM->renderFrame();
SwapBuffers(hdc);
@@ -188,7 +189,6 @@ STDMETHODIMP CProjectMwmp::RenderFullScreen(TimedLevel *pLevels)
STDMETHODIMP CProjectMwmp::GoFullscreen(BOOL fFullScreen)
{
-
return S_OK;
}
@@ -336,7 +336,7 @@ STDMETHODIMP CProjectMwmp::Create(HWND hwndParent)
// CProjectMwmp::Destroy
// Invoked when the visualization should be released.
//
-// Any resources allocated for rendering should be released.
+// Any resources allocated for ing should be released.
//////////////////////////////////////////////////////////////////////////////
STDMETHODIMP CProjectMwmp::Destroy()
{
@@ -411,7 +411,7 @@ STDMETHODIMP CProjectMwmp::OnWindowMessage(UINT msg, WPARAM WParam, LPARAM LPara
}
//////////////////////////////////////////////////////////////////////////////
-// CProjectMwmp::RenderWindowed
+// CProjectMwmp::Windowed
// Called when an effect should render itself to the screen.
//
// The fRequiredRender flag specifies if an update is required, otherwise the
diff --git a/src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj b/src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj
index 99673b6e4..95ebc1e7e 100644
--- a/src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj
+++ b/src/projectM-wmp/projectM-wmp/projectM-wmp.vcproj
@@ -44,7 +44,7 @@
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_WINNT_WIN32=0x5000;"
MinimalRebuild="true"
BasicRuntimeChecks="0"
- RuntimeLibrary="3"
+ RuntimeLibrary="1"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
@@ -129,7 +129,7 @@
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=""..\..\projectM-engine";"..\..\WinLibs\glew\include\GL";"
PreprocessorDefinitions="WIN32;_WINDOWS;_USRDLL;_WINNT_WIN32=0x5000"
- RuntimeLibrary="2"
+ RuntimeLibrary="0"
UsePrecompiledHeader="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"