-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,7 +270,7 @@ std::string fileNameToUnitName(const std::string& fileName) | |
|
||
// Globals | ||
|
||
static InterfaceTable *ft; | ||
static InterfaceTable* ft; | ||
|
||
// The SuperCollider UGen class name generated here must match | ||
// that generated by faust2sc: | ||
|
@@ -419,7 +419,7 @@ void Faust_Ctor(Faust* unit) // module constructor | |
Print("Faust[%s]: RT memory allocation failed, try increasing the real-time memory size in the server options\n", g_unitName); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
LFSaw
|
||
goto end; | ||
} | ||
for (int i=0; i < unit->getNumAudioInputs(); ++i) { | ||
for (int i = 0; i < unit->getNumAudioInputs(); ++i) { | ||
// Initialize interpolator. | ||
unit->mInBufValue[i] = IN0(i); | ||
// Aquire buffer memory. | ||
|
@@ -479,15 +479,16 @@ FAUST_EXPORT void load(InterfaceTable* inTable) | |
ft = inTable; | ||
|
||
MetaData meta; | ||
mydsp tmp_dsp; | ||
tmp_dsp.metadata(&meta); | ||
|
||
mydsp* tmp_dsp = new FAUSTCLASS; | ||
tmp_dsp->metadata(&meta); | ||
delete tmp_dsp; | ||
|
||
std::string name = meta["name"]; | ||
|
||
if (name.empty()) { | ||
name = fileNameToUnitName(__FILE__); | ||
} | ||
|
||
name = normalizeClassName(name); | ||
|
||
#if !defined(NDEBUG) & defined(SC_API_EXPORT) | ||
|
@@ -502,10 +503,10 @@ FAUST_EXPORT void load(InterfaceTable* inTable) | |
return; | ||
} | ||
|
||
if (strncmp(name.c_str(),SC_FAUST_PREFIX,strlen(SC_FAUST_PREFIX))!=0) { | ||
if (strncmp(name.c_str(), SC_FAUST_PREFIX, strlen(SC_FAUST_PREFIX)) != 0) { | ||
name = SC_FAUST_PREFIX + name; | ||
} | ||
|
||
// Initialize global data | ||
// TODO: Use correct sample rate | ||
initState(name, 48000); | ||
|
4 comments
on commit c80f442
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is mydsp* tmp_dsp = new FAUSTCLASS; (instead of previous problematic stack allocation).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might need an explicit free in Dtor? (forgive my dumb comments, c(++) is really not my expertise...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete tmp_dsp; at line 484
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see, that's what I meant with dumb ;)
This line seems to be never reached within scsynth