fdGain and fdSupercollider Small changes for signature of BaseAudioClient and parameter updates

nix
Owen Green 7 years ago
parent 8c6c4b5528
commit 12b67d3de5

@ -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();

@ -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<double,float>(window_size,hop_size,fft_size);
m_client = new audio::BaseSTFTClient<double,float>(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();

Loading…
Cancel
Save