From 94ab8a946255bda2bb28cb94c064e3b899774bc5 Mon Sep 17 00:00:00 2001 From: Tim Blechmann Date: Sun, 9 Oct 2005 09:55:24 +0000 Subject: more flext-like dsp callbacks svn path=/trunk/externals/tb/; revision=3686 --- chaos/src/chaos_dsp.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/chaos/src/chaos_dsp.hpp b/chaos/src/chaos_dsp.hpp index 16e2820..821b544 100644 --- a/chaos/src/chaos_dsp.hpp +++ b/chaos/src/chaos_dsp.hpp @@ -39,15 +39,16 @@ public: /* cubic interpolation */ void m_signal_c(int n, t_sample *const *insigs,t_sample *const *outsigs); - virtual void m_signal(int n, t_sample *const *insigs,t_sample *const *outsigs) + virtual void CbSignal() { - (this->*m_routine)(n,insigs,outsigs); + (this->*m_routine)(Blocksize(),InSig(),OutSig()); } - virtual void m_dsp(int n, t_sample *const *insigs,t_sample *const *outsigs) + virtual bool CbDsp() { m_sr = Samplerate(); set_freq(m_freq); /* maybe we have to change the interpolation mode */ + return true; } void (thisType::*m_routine)(int n, t_sample *const *insigs,t_sample *const *outsigs); @@ -130,14 +131,14 @@ public: if (f < 0) /* we can't go back in time :-) */ f = -f; - if( f <= m_sr * 0.5 ) + if( f <= m_sr * 0.1 ) { if (m_freq >= m_sr * 0.5) set_imethod(m_imethod); m_freq = f; m_invfreq = 1.f / f; } - else if (f > m_sr * 0.5) + else if (f > m_sr * 0.1) { m_freq = f; m_invfreq = 1.f / f; -- cgit v1.2.1