Run Unit doneAction once everything is tidied away

nix
Owen Green 7 years ago
parent b3895c5be6
commit 021fc1d917

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

Loading…
Cancel
Save