Commit a8b0a61b authored by thomas's avatar thomas
Browse files

change click modifier to shift (seems to work)

update DSP methods for SndObj and STK classes


git-svn-id: https://svn.grrrr.org/ext/trunk@1122 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent cd585763
...@@ -121,10 +121,10 @@ ...@@ -121,10 +121,10 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="c:\data\pd\pd-cvs\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-0\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS_PD;FLEXT_THREADS;FLEXT_USE_SIMD;FLEXT_EXPORTS;xFLEXT_ATTRHIDE;xFLEXT_NOATTREDIT;_WIN32_WINNT=0x501"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="1"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
PrecompiledHeaderThrough="flext.h" PrecompiledHeaderThrough="flext.h"
...@@ -171,11 +171,11 @@ ...@@ -171,11 +171,11 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-test4\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include" AdditionalIncludeDirectories="c:\programme\audio\pd-0.39-0\src;c:\data\prog\audio\sndobj\include;c:\data\prog\audio\stk\include"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_DEBUGMEM;_WIN32_WINNT=0x400" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;FLEXT_SYS=2;FLEXT_USE_SIMD;FLEXT_EXPORTS;FLEXT_DEBUGMEM;_WIN32_WINNT=0x400"
StringPooling="TRUE" StringPooling="TRUE"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="1" RuntimeLibrary="5"
RuntimeTypeInfo="TRUE" RuntimeTypeInfo="TRUE"
UsePrecompiledHeader="2" UsePrecompiledHeader="2"
PrecompiledHeaderThrough="flext.h" PrecompiledHeaderThrough="flext.h"
......
...@@ -25,6 +25,7 @@ WARRANTIES, see the file, "license.txt," in this distribution. ...@@ -25,6 +25,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#pragma warning (push) #pragma warning (push)
#pragma warning (disable:4091) #pragma warning (disable:4091)
#endif #endif
// for canvas_realizedollar (should be noon-critical)
#include <g_canvas.h> #include <g_canvas.h>
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning (pop) #pragma warning (pop)
......
...@@ -54,9 +54,15 @@ public: ...@@ -54,9 +54,15 @@ public:
//! returns array of input vectors (CntInSig() vectors) //! returns array of input vectors (CntInSig() vectors)
t_sample *const *InSig() const { return invecs; } t_sample *const *InSig() const { return invecs; }
//! returns input vector
t_sample *InSig(int i) const { return invecs[i]; }
//! returns array of output vectors (CntOutSig() vectors) //! returns array of output vectors (CntOutSig() vectors)
t_sample *const *OutSig() const { return outvecs; } t_sample *const *OutSig() const { return outvecs; }
//! returns output vector
t_sample *OutSig(int i) const { return outvecs[i]; }
//! typedef describing a signal vector //! typedef describing a signal vector
#if FLEXT_SYS == FLEXT_SYS_JMAX #if FLEXT_SYS == FLEXT_SYS_JMAX
typedef fts_symbol_t t_signalvec; typedef fts_symbol_t t_signalvec;
......
...@@ -175,7 +175,7 @@ void flext_base::CbClick() {} ...@@ -175,7 +175,7 @@ void flext_base::CbClick() {}
#if FLEXT_SYS == FLEXT_SYS_PD #if FLEXT_SYS == FLEXT_SYS_PD
void flext_base::cb_click(t_gobj *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt) void flext_base::cb_click(t_gobj *c,t_floatarg xpos,t_floatarg ypos,t_floatarg shift,t_floatarg ctrl,t_floatarg alt)
{ {
if(alt) thisObject(c)->CbClick(); if(shift) thisObject(c)->CbClick();
} }
#endif #endif
......
...@@ -50,7 +50,7 @@ void flext_sndobj::ClearObjs() ...@@ -50,7 +50,7 @@ void flext_sndobj::ClearObjs()
} }
} }
void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out) bool flext_sndobj::CbDsp()
{ {
// called on every rebuild of the dsp chain // called on every rebuild of the dsp chain
...@@ -68,13 +68,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out) ...@@ -68,13 +68,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
inobj = new Inlet *[inobjs]; inobj = new Inlet *[inobjs];
tmpobj = new SndObj *[inobjs]; tmpobj = new SndObj *[inobjs];
for(i = 0; i < inobjs; ++i) { for(i = 0; i < inobjs; ++i) {
inobj[i] = new Inlet(in[i],blsz,smprt); inobj[i] = new Inlet(InSig(i),blsz,smprt);
tmpobj[i] = new SndObj(NULL,blsz,smprt); tmpobj[i] = new SndObj(NULL,blsz,smprt);
} }
} }
if(outobjs) { if(outobjs) {
outobj = new Outlet *[outobjs]; outobj = new Outlet *[outobjs];
for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(out[i],blsz,smprt); for(i = 0; i < outobjs; ++i) outobj[i] = new Outlet(OutSig(i),blsz,smprt);
} }
if(!NewObjs()) ClearObjs(); if(!NewObjs()) ClearObjs();
...@@ -82,12 +82,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out) ...@@ -82,12 +82,13 @@ void flext_sndobj::m_dsp(int n,t_sample *const *in,t_sample *const *out)
else { else {
// assign changed input/output vectors // assign changed input/output vectors
for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]); for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i));
for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]); for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i));
} }
return true;
} }
void flext_sndobj::m_signal(int n,t_sample *const *in,t_sample *const *out) void flext_sndobj::CbSignal()
{ {
for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i]; for(int i = 0; i < inobjs; ++i) *tmpobj[i] << *inobj[i];
ProcessObjs(); ProcessObjs();
......
...@@ -41,9 +41,6 @@ protected: ...@@ -41,9 +41,6 @@ protected:
virtual bool Init(); virtual bool Init();
virtual void Exit(); virtual void Exit();
virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out);
virtual void m_signal(int n,t_sample *const *in,t_sample *const *out);
private: private:
//! SndObj for reading from inlet buffer //! SndObj for reading from inlet buffer
class Inlet: class Inlet:
...@@ -75,6 +72,9 @@ private: ...@@ -75,6 +72,9 @@ private:
t_sample *buf; t_sample *buf;
}; };
virtual bool CbDsp();
virtual void CbSignal();
void ClearObjs(); void ClearObjs();
int inobjs,outobjs; int inobjs,outobjs;
......
...@@ -45,7 +45,7 @@ void flext_stk::ClearObjs() ...@@ -45,7 +45,7 @@ void flext_stk::ClearObjs()
} }
} }
void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out) bool flext_stk::CbDsp()
{ {
// called on every rebuild of the dsp chain // called on every rebuild of the dsp chain
...@@ -64,12 +64,12 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out) ...@@ -64,12 +64,12 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
if(inobjs) { if(inobjs) {
inobj = new Input *[inobjs]; inobj = new Input *[inobjs];
for(i = 0; i < inobjs; ++i) for(i = 0; i < inobjs; ++i)
inobj[i] = new Input(in[i],blsz); inobj[i] = new Input(InSig(i),blsz);
} }
if(outobjs) { if(outobjs) {
outobj = new Output *[outobjs]; outobj = new Output *[outobjs];
for(i = 0; i < outobjs; ++i) for(i = 0; i < outobjs; ++i)
outobj[i] = new Output(out[i],blsz); outobj[i] = new Output(OutSig(i),blsz);
} }
if(!NewObjs()) ClearObjs(); if(!NewObjs()) ClearObjs();
...@@ -77,12 +77,13 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out) ...@@ -77,12 +77,13 @@ void flext_stk::m_dsp(int n,t_sample *const *in,t_sample *const *out)
else { else {
// assign changed input/output vectors // assign changed input/output vectors
for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(in[i]); for(i = 0; i < inobjs; ++i) inobj[i]->SetBuf(InSig(i));
for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(out[i]); for(i = 0; i < outobjs; ++i) outobj[i]->SetBuf(OutSig(i));
} }
return true;
} }
void flext_stk::m_signal(int n,t_sample *const *in,t_sample *const *out) void flext_stk::CbSignal()
{ {
if(inobjs || outobjs) ProcessObjs(blsz); if(inobjs || outobjs) ProcessObjs(blsz);
} }
......
...@@ -79,8 +79,8 @@ protected: ...@@ -79,8 +79,8 @@ protected:
Output &Outlet(int ix) { return *outobj[ix]; } Output &Outlet(int ix) { return *outobj[ix]; }
private: private:
virtual void m_dsp(int n,t_sample *const *in,t_sample *const *out); virtual bool CbDsp();
virtual void m_signal(int n,t_sample *const *in,t_sample *const *out); virtual void CbSignal();
void ClearObjs(); void ClearObjs();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment