diff options
Diffstat (limited to 'synth/main.cpp')
-rw-r--r-- | synth/main.cpp | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/synth/main.cpp b/synth/main.cpp index ae2e0d8..56c47b9 100644 --- a/synth/main.cpp +++ b/synth/main.cpp @@ -12,6 +12,7 @@ #include "programs.h" #include "defines.h" #include "globals.h" +#include "note_loader.h" using namespace std; @@ -104,6 +105,24 @@ int main(int argc, char** argv) try { program_settings[i]=parse(programfile[i]); + + // try to load the appropriate .so file + if (access( (programfile[i]+".so").c_str(), R_OK ) == 0) + { + try + { + cout << "trying to load..."<<endl; + load_note_from_so(programfile[i]+".so", program_settings[i]); + } + catch (string err) + { + output_note("NOTE: could not load shared object '"+programfile[i]+".so"+"':\n" + " "+err+"\n" + " this is not fatal, the note has been loaded properly, but generic\n" + " unoptimized (slow) code will be used."); + } + } + } catch (string err) { @@ -119,7 +138,9 @@ int main(int argc, char** argv) } } - + for (i=0;i<N_WAVEFORMS;i++) + wave[i]=new fixed_t[WAVE_RES]; + for (i=0;i<WAVE_RES;i++) { wave[0][i]=sin(i*2.0*3.141592654/WAVE_RES)*ONE; |