[Clam-devel] reload ladspa

Pau Arumi parumi at iua.upf.edu
Fri Apr 6 18:28:33 PDT 2007


it worked here, so i've commited the patch. thanks!
revision 9952

(revision 10000 is getting near)



En/na Andreas Calvo ha escrit:
> Getting in touch with the Faust language, we found that we need to 
> reload all ladspa plugins that are on the processing tree.
> This earlier patch provides this functionality by clicking on the 
> compile-faust button (find on the toolbar of the NetworkEditor).
> 
> 
> ------------------------------------------------------------------------
> 
> Index: NetworkEditor/src/MainWindow.hxx
> ===================================================================
> --- NetworkEditor/src/MainWindow.hxx	(revisión: 9932)
> +++ NetworkEditor/src/MainWindow.hxx	(copia de trabajo) 
> @@ -24,6 +24,9 @@
>  #include <CLAM/CLAMVersion.hxx>
>  #include "NetworkEditorVersion.hxx"
>  
> +// faust testing
> +#include <CLAM/LadspaFactory.hxx>
> +
>  #ifdef USE_JACK
>  #include <CLAM/JACKNetworkPlayer.hxx>
>  #endif
> @@ -54,8 +57,8 @@
>  		setCentralWidget(scroll);
>  		scroll->setWidget(_canvas);
>  		
> -		QDockWidget * dock = new QDockWidget(this);
> -		NetworkGUI::ProcessingTree * processingTree = new NetworkGUI::ProcessingTree(dock);
> +		dock = new QDockWidget(this);
> +		processingTree = new NetworkGUI::ProcessingTree(dock);
>  		dock->setWindowTitle("Processing Toolbox");
>  		dock->setWidget(processingTree);
>  		addDockWidget(Qt::LeftDockWidgetArea, dock);
> @@ -384,6 +387,13 @@
>  				"<p>Compile and load Faust</p>\n"
>  				"<p>Compile all .dsp (Faust) files in the faust_dir and load all generated Ladspa plugins.</p>\n"
>  			));
> +		//removeDockWidget(dock);
> +		//dock = new QDockWidget(this);
> +		CLAM::LadspaFactory::GetInstance().Clear();
> +		delete(processingTree);
> +		processingTree = new NetworkGUI::ProcessingTree(dock);
> +		dock->setWidget(processingTree);
> +		addDockWidget(Qt::LeftDockWidgetArea, dock);
>  	}
>  	void on_action_Quit_triggered()
>  	{
> @@ -398,6 +408,10 @@
>  	QLabel * _backendLabel;
>  	QLabel * _playingLabel;
>  	QStringList _recentFiles;
> +
> +	// faust testing
> +	QDockWidget * dock;
> +	NetworkGUI::ProcessingTree * processingTree;
>  };
>  
>  
> Index: CLAM/src/Processing/Plugins/LadspaFactory.hxx
> ===================================================================
> --- CLAM/src/Processing/Plugins/LadspaFactory.hxx	(revisión: 9932)
> +++ CLAM/src/Processing/Plugins/LadspaFactory.hxx	(copia de trabajo)
> @@ -50,6 +50,10 @@
>  		}
>  		return result;
>  	}
> +	void Clear()
> +	{
> +		_creators.clear();
> +	}
>  private:
>  	typedef std::map< std::string, LadspaWrapperCreator* > LadspaCreatorMap;
>  	LadspaCreatorMap _creators;
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-devel





More information about the clam-devel mailing list