40 std::map<int, Glib::ustring> enumdict;
43 inline void sf(
int f) { set_flags |= f; }
51 inline bool is_set(
int f)
const {
return set_flags & f; }
52 inline void unset(
int f) { set_flags &= ~f; }
59 inline const Glib::ustring&
get_name() {
return name; }
65 inline bool has_enumkey(
int k) {
return enumdict.find(k) != enumdict.end(); }
67 inline std::map<int, Glib::ustring>::iterator
find_enum(
int k) {
return enumdict.find(k); }
68 inline void erase_enum(
int k) { enumdict.erase(enumdict.find(k)); }
69 inline std::map<int, Glib::ustring>::iterator
enum_end() {
return enumdict.end(); }
94 static const int SR = 44100;
96 void set_range_default(
const LADSPA_PortRangeHint& h,
ChangeableValues& store);
97 void set_default_value(
const LADSPA_PortRangeHint& h,
ChangeableValues& store);
100 void set_default(
float value, Glib::ustring label);
104 PortDesc(
int idx_,
int pos_,
bool is_output_, Glib::ustring name,
const LADSPA_PortRangeHint& hint);
108 void fixup(
bool newrow);
109 bool check_changed(
const PortDesc& vp)
const;
110 Glib::ustring get_enum(
int idx);
162 bool check_changed();
163 bool _i_check_has_settings();
164 void check_has_settings();
165 int set_active(
bool v);
167 void set_add_wet_dry_controller(
bool v);
168 void set_stereo_to_mono(
bool v);
170 void set_category(
const std::vector<Glib::ustring>& s);
171 void set_default(
int idx,
float value,
const Glib::ustring& label);
172 void set_state(
const Glib::ustring& fname);
174 PluginDesc(
const LADSPA_Descriptor& desc,
int tp_, std::vector<PortDesc*>& ctrl_ports_,
const std::string path_,
int index_);
175 PluginDesc(LilvWorld *world,
const LilvPlugin* plugin,
int tp_, std::vector<PortDesc*>& ctrl_ports_);
204 typedef std::map<std::string, PluginDesc*> pluginmap;
206 const LilvPlugins* lv2_plugins;
207 LilvNode* lv2_AudioPort;
208 LilvNode* lv2_ControlPort;
209 LilvNode* lv2_InputPort;
210 LilvNode* lv2_OutputPort;
211 LilvNode* lv2_connectionOptional;
214 static size_t n_uris;
215 static LV2_URID map_uri(LV2_URID_Map_Handle handle,
const char* uri);
216 static const char* unmap_uri(LV2_URID_Map_Handle handle, LV2_URID urid);
217 static void get_preset_values(
const char* port_symbol,
void* user_data,
const void* value, uint32_t size, uint32_t type);
218 static void set_preset_values(Glib::ustring port_symbol,
LV2Preset* pdata, Glib::ustring value);
219 static inline std::string make_key(
unsigned long unique_id) {
return "ladspa://" +
gx_system::to_string(unique_id); }
220 static void add_plugin(
const LADSPA_Descriptor& desc, pluginmap& d,
const std::string& path,
int index);
221 static void load_defs(
const std::string& path, pluginmap& d);
222 static void set_instances(
const char *uri, pluginmap& d, std::vector<Glib::ustring>& label,
223 std::vector<unsigned long>& not_found, std::set<unsigned long>& seen);
224 static void descend(
const char *uri, pluginmap& d,
225 std::vector<unsigned long>& not_found, std::set<unsigned long>& seen,
226 std::vector<Glib::ustring>& base);
238 using std::vector<PluginDesc*>::begin;
CmdConnection::msg_type end
void set_enumvalue(int k, const Glib::ustring &v)
const Glib::ustring & get_name()
friend bool operator!=(const ChangeableValues &v1, const ChangeableValues &v2)
std::map< int, Glib::ustring >::iterator enum_end()
void serializeJSON(gx_system::JsonWriter &jw)
int get_excl_flags(DisplayType tp) const
std::vector< PortDesc * > ctrl_ports
std::string ladspa_category
const Glib::ustring & get_name()
std::vector< PortDesc * > ctrl_ports
Glib::ustring deduced_category
bool has_settings(DisplayType tp) const
bool cmp_ctrl_ports(const PortDesc *a, const PortDesc *b)
LADSPA_PortRangeHintDescriptor hint_desc
void set_tp(DisplayType v)
std::string to_string(const T &t)
Glib::ustring MasterLabel
void set_name(const Glib::ustring &nm)
bool enumkey_changed(int k)
std::map< int, Glib::ustring >::iterator find_enum(int k)