diff --git a/src/fdGain/fdGain.cpp b/src/fdGain/fdGain.cpp index fb2b219..5b59346 100644 --- a/src/fdGain/fdGain.cpp +++ b/src/fdGain/fdGain.cpp @@ -4,6 +4,8 @@ #include "SC_PlugIn.hpp" #include "data/FluidTensor.hpp" #include "clients/rt/GainClient.hpp" +#include "clients/common/FluidParams.hpp" + //Using statements for fluidtensor using fluid::FluidTensor; @@ -29,11 +31,15 @@ public: const float chunk_size = in0(1); //Oh NO! Heap allocation! Make client object - if(chunk_size) - m_client = new client_type(chunk_size,chunk_size); - else - m_client = new client_type(1024,1024); - +// if(chunk_size) + m_client = new client_type(65536); +// else +// m_client = new client_type(1024,1024); + + fluid::parameter::lookupParam("winsize", m_client->getParams()).setLong(1024); + fluid::parameter::lookupParam("hopsize", m_client->getParams()).setLong(1024); + fluid::parameter::lookupParam("gain", m_client->getParams()).setFloat(1); + m_client->set_host_buffer_size(bufferSize()); m_client->reset(); diff --git a/src/fdSTFTPass/fdSTFTPass.cpp b/src/fdSTFTPass/fdSTFTPass.cpp index a3a8460..0555530 100644 --- a/src/fdSTFTPass/fdSTFTPass.cpp +++ b/src/fdSTFTPass/fdSTFTPass.cpp @@ -26,9 +26,25 @@ public: const float window_size = in0(1); const float hop_size = in0(2); const float fft_size = in0(3); - + + //Oh NO! Heap allocation! Make client object - m_client = new audio::BaseSTFTClient(window_size,hop_size,fft_size); + m_client = new audio::BaseSTFTClient(65536); + m_client->getParams()[0].setLong(window_size); + m_client->getParams()[1].setLong(hop_size); + m_client->getParams()[2].setLong(fft_size); + + bool isOK; + std::string feedback; + + std::tie(isOK, feedback) = m_client->sanityCheck(); + if(!isOK) + { + Print("fdSTFTPass Error: %s",feedback.c_str()); + return; + } + + m_client->set_host_buffer_size(bufferSize()); m_client->reset();