diff --git a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp index 8f1a5e007..34663c2c3 100644 --- a/plugins/zynaddsubfx/LocalZynAddSubFx.cpp +++ b/plugins/zynaddsubfx/LocalZynAddSubFx.cpp @@ -49,10 +49,9 @@ LocalZynAddSubFx::LocalZynAddSubFx() pthread_win32_thread_attach_np(); #endif - config.init(); - OSCIL_SIZE = config.cfg.OscilSize; + initConfig(); - config.cfg.GzipCompression = 0; + OSCIL_SIZE = config.cfg.OscilSize; srand( time( NULL ) ); denormalkillbuf = new REALTYPE[SOUND_BUFFER_SIZE]; @@ -83,6 +82,16 @@ LocalZynAddSubFx::~LocalZynAddSubFx() +void LocalZynAddSubFx::initConfig() +{ + config.init(); + + config.cfg.GzipCompression = 0; +} + + + + void LocalZynAddSubFx::setSampleRate( int _sampleRate ) { SAMPLE_RATE = _sampleRate; @@ -173,7 +182,8 @@ void LocalZynAddSubFx::setLmmsWorkingDir( const std::string & _dir ) free( config.workingDir ); } config.workingDir = strdup( _dir.c_str() ); - config.init(); + + initConfig(); } diff --git a/plugins/zynaddsubfx/LocalZynAddSubFx.h b/plugins/zynaddsubfx/LocalZynAddSubFx.h index 6ab045742..9d6d66345 100644 --- a/plugins/zynaddsubfx/LocalZynAddSubFx.h +++ b/plugins/zynaddsubfx/LocalZynAddSubFx.h @@ -35,6 +35,8 @@ public: LocalZynAddSubFx(); ~LocalZynAddSubFx(); + void initConfig(); + void setSampleRate( int _sampleRate ); void setBufferSize( int _bufferSize );