diff --git a/include/FluidSCWrapper.hpp b/include/FluidSCWrapper.hpp index ac624e9..3adea8a 100644 --- a/include/FluidSCWrapper.hpp +++ b/include/FluidSCWrapper.hpp @@ -170,6 +170,7 @@ public: , mParams{Wrapper::Client::getParameterDescriptors()} , mClient{Wrapper::setParams(mParams,mWorld->mVerbosity > 0, mWorld, mControlsIterator,true)} {} + /// No option of not using a worker thread for now /// init() sets up the NRT process via the SC NRT thread, and then sets our UGen calc function going @@ -235,10 +236,11 @@ public: static bool tidyUp(World *world, void *data) { return static_cast(data)->tidyUp(world); } /// Now we're actually properly done, call the UGen's done action (possibly destroying this instance) - static void destroy(World *, void *data) + static void destroy(World *world, void *data) { auto w = static_cast(data); - w->mWorld->ft->fDoneAction(static_cast(w->mInBuf[w->mNumInputs - 1][0]),w); + int doneAction = static_cast(w->in0(static_cast(w->mNumInputs - 1))); + world->ft->fDoneAction(doneAction,w); } private: