1 /*
2  * Copyright (C) 2002 - David W. Durham
3  *
4  * This file is part of ReZound, an audio editing application.
5  *
6  * ReZound is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published
8  * by the Free Software Foundation; either version 2 of the License,
9  * or (at your option) any later version.
10  *
11  * ReZound is distributed in the hope that it will be useful, but
12  * WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA
19  */
20 
21 #ifndef __utils_H__
22 #define __utils_H__
23 
24 #include "../../../config/common.h"
25 
26 
27 #include "ladspa.h"
28 
29 #include <vector>
30 
31 // searches the LADSPA_PATH env var and returns a vector of descriptors for all plugins found
32 const vector<const LADSPA_Descriptor *> findLADSPAPlugins();
33 
34 
35 // Find the default value for a port. Return 0 if a default is found and -1 if not
36 int getLADSPADefault(const LADSPA_PortRangeHint * psPortRangeHint,const unsigned long lSampleRate,LADSPA_Data * pfResult);
37 
38 
39 // return a default mapping of channels which should be usable for most plugins
40 #include "../CPluginMapping.h"
41 	// throws a runtime_error when it cannot determine a default mapping
42 const CPluginMapping getLADSPADefaultMapping(const LADSPA_Descriptor *plugin,const CSound *sound);
43 
44 
45 #endif
46