From: terminator356 <ter...@us...> - 2009-12-04 02:21:58
|
Update of /cvsroot/lmuse/muse/muse In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv13866/muse Modified Files: Tag: REL07 app.cpp dssihost.cpp song.cpp song.h synth.cpp Log Message: See ChangeLog Index: dssihost.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/dssihost.cpp,v retrieving revision 1.15.2.11 retrieving revision 1.15.2.12 diff -C2 -d -r1.15.2.11 -r1.15.2.12 *** dssihost.cpp 3 Dec 2009 21:23:48 -0000 1.15.2.11 --- dssihost.cpp 4 Dec 2009 02:21:49 -0000 1.15.2.12 *************** *** 35,39 **** #include <qpopupmenu.h> #include <qprocess.h> - #include <qtimer.h> #include "dssihost.h" --- 35,38 ---- *************** *** 737,740 **** --- 736,760 ---- DssiSynthIF::~DssiSynthIF() { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF\n"); + + if(synth) + { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF synth:%p\n", synth); + + if(synth->dssi) + { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF synth->dssi:%p\n", synth->dssi); + + if(synth->dssi->LADSPA_Plugin) + { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIFsynth->dssi->LADSPA_Plugin:%p\n", synth->dssi->LADSPA_Plugin); + } + } + } + if(synth && synth->dssi && synth->dssi->LADSPA_Plugin) { *************** *** 742,747 **** --- 762,775 ---- const LADSPA_Descriptor* descr = dssi->LADSPA_Plugin; + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF checking cleanup function exists\n"); + if (descr->cleanup) + { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF calling cleanup function\n"); + descr->cleanup(handle); + } } *************** *** 751,755 **** --- 779,788 ---- { if(guiQProc->isRunning()) + { + if(DSSI_DEBUG) + printf("DssiSynthIF::~DssiSynthIF killing guiQProc\n"); + guiQProc->kill(); + } //delete guiQProc; Index: synth.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/synth.cpp,v retrieving revision 1.43.2.20 retrieving revision 1.43.2.21 diff -C2 -d -r1.43.2.20 -r1.43.2.21 *** synth.cpp 30 Nov 2009 05:05:49 -0000 1.43.2.20 --- synth.cpp 4 Dec 2009 02:21:49 -0000 1.43.2.21 *************** *** 406,413 **** { _sif->deactivate3(); ! synthesizer->incInstances(-1); delete _sif; _sif = 0; } --- 406,422 ---- { _sif->deactivate3(); ! // Moved below by Tim. p3.3.14 ! //synthesizer->incInstances(-1); ! ! if(debugMsg) ! printf("SynthI::deactivate3 deleting _sif...\n"); delete _sif; _sif = 0; + + if(debugMsg) + printf("SynthI::deactivate3 decrementing synth instances...\n"); + + synthesizer->incInstances(-1); } Index: song.h =================================================================== RCS file: /cvsroot/lmuse/muse/muse/song.h,v retrieving revision 1.35.2.23 retrieving revision 1.35.2.24 diff -C2 -d -r1.35.2.23 -r1.35.2.24 *** song.h 16 Nov 2009 11:29:33 -0000 1.35.2.23 --- song.h 4 Dec 2009 02:21:49 -0000 1.35.2.24 *************** *** 167,170 **** --- 167,171 ---- void clear(bool signal); void update(int flags = -1); + void cleanupForQuit(); int globalPitchShift() const { return _globalPitchShift; } Index: song.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/song.cpp,v retrieving revision 1.59.2.49 retrieving revision 1.59.2.50 diff -C2 -d -r1.59.2.49 -r1.59.2.50 *** song.cpp 30 Nov 2009 05:05:49 -0000 1.59.2.49 --- song.cpp 4 Dec 2009 02:21:49 -0000 1.59.2.50 *************** *** 1899,1902 **** --- 1899,1905 ---- void Song::clear(bool signal) { + if(debugMsg) + printf("Song::clear\n"); + bounceTrack = 0; *************** *** 1954,1957 **** --- 1957,2044 ---- //--------------------------------------------------------- + // cleanupForQuit + // called from Muse::closeEvent + //--------------------------------------------------------- + + void Song::cleanupForQuit() + { + bounceTrack = 0; + + if(debugMsg) + printf("MusE: Song::cleanupForQuit...\n"); + + _tracks.clear(); + + if(debugMsg) + printf("deleting _midis\n"); + _midis.clearDelete(); + + if(debugMsg) + printf("deleting _waves\n"); + _waves.clearDelete(); + + if(debugMsg) + printf("deleting _inputs\n"); + _inputs.clearDelete(); // audio input ports + + if(debugMsg) + printf("deleting _outputs\n"); + _outputs.clearDelete(); // audio output ports + + if(debugMsg) + printf("deleting _groups\n"); + _groups.clearDelete(); // mixer groups + + if(debugMsg) + printf("deleting _auxs\n"); + _auxs.clearDelete(); // aux sends + + if(debugMsg) + printf("deleting _synthIs\n"); + _synthIs.clearDelete(); // each ~SynthI() -> deactivate3() -> ~SynthIF() + + tempomap.clear(); + sigmap.clear(); + + undoList->clearDelete(); + redoList->clear(); // Check this - For items in both lists: Should we do a clearDelete? IIRC it was OK this way... + if(debugMsg) + printf("deleting undoList, redoList\n"); + + _markerList->clear(); + + if(debugMsg) + printf("deleting transforms...\n"); + clearMidiTransforms(); // Deletes stuff. + clearMidiInputTransforms(); // Deletes stuff. + + if(debugMsg) + printf("deleting midiport controllers...\n"); + // Clear all midi port controllers and values. + for(int i = 0; i < MIDI_PORTS; ++i) + // Remove the controllers and the values. + midiPorts[i].controller()->clearDelete(true); + + if(debugMsg) + printf("deleting synths...\n"); + // Delete all synths. + std::vector<Synth*>::iterator is; + for(is = synthis.begin(); is != synthis.end(); ++is) + { + Synth* s = *is; + + if(s) + delete s; + } + synthis.clear(); + + // Nothing required for ladspa plugin list, and rack instances of them + // are handled by ~AudioTrack. + + if(debugMsg) + printf("...finished cleaning up.\n"); + } + + //--------------------------------------------------------- // seqSignal // sequencer message to GUI Index: app.cpp =================================================================== RCS file: /cvsroot/lmuse/muse/muse/app.cpp,v retrieving revision 1.113.2.60 retrieving revision 1.113.2.61 diff -C2 -d -r1.113.2.60 -r1.113.2.61 *** app.cpp 25 Nov 2009 09:09:43 -0000 1.113.2.60 --- app.cpp 4 Dec 2009 02:21:49 -0000 1.113.2.61 *************** *** 115,119 **** --- 115,122 ---- extern void initIcons(); extern void initMidiSynth(); + extern bool initJackAudio(); + extern void exitJackAudio(); extern bool initDummyAudio(); + extern void exitDummyAudio(); extern void initVST_fst_init(); extern void initVST(); *************** *** 328,335 **** } - - extern bool initJackAudio(); - extern void exitJackAudio(); - //--------------------------------------------------------- // addProject --- 331,334 ---- *************** *** 1375,1381 **** } exitJackAudio(); ! SynthIList* sl = song->syntis(); ! for (iSynthI i = sl->begin(); i != sl->end(); ++i) ! delete *i; // Cleanup temporary wavefiles + peakfiles used for undo --- 1374,1384 ---- } exitJackAudio(); ! exitDummyAudio(); ! ! // Changed by Tim. p3.3.14 ! //SynthIList* sl = song->syntis(); ! //for (iSynthI i = sl->begin(); i != sl->end(); ++i) ! // delete *i; ! song->cleanupForQuit(); // Cleanup temporary wavefiles + peakfiles used for undo *************** *** 1387,1390 **** --- 1390,1405 ---- d.remove(f.baseName(true) + ".wca"); } + + // Added by Tim. p3.3.14 + + #ifdef HAVE_LASH + // Disconnect gracefully from LASH. + if(!lash_client) + { + lash_event_t* lashev = lash_event_new_with_type (LASH_Quit); + lash_send_event(lash_client, lashev); + } + #endif + qApp->quit(); } *************** *** 3045,3049 **** { /* quit muse */ ! std::cout << "Quit" << std::endl; lash_event_destroy (event); --- 3060,3064 ---- { /* quit muse */ ! std::cout << "MusE::lash_idle_cb Received LASH_Quit" << std::endl; lash_event_destroy (event); *************** *** 3053,3057 **** default: { ! std::cout << "Recieved unknown LASH event of type " << lash_event_get_type (event) << std::endl; --- 3068,3072 ---- default: { ! std::cout << "MusE::lash_idle_cb Received unknown LASH event of type " << lash_event_get_type (event) << std::endl; |