Add some foaf and doap info to zynadd.ttl
[zyn.git] / zynadd_internal.h
blob51052b198fedcde2fe8bcec0abb17028dae666a0
1 /* -*- Mode: C ; c-basic-offset: 2 -*- */
2 /*****************************************************************************
4 * Copyright (C) 2006,2007 Nedko Arnaudov <nedko@arnaudov.name>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19 *****************************************************************************/
21 #ifndef ZYNADD_INTERNAL_H__A38C6254_E7AD_443E_AA5F_A5AB3FCB8B06__INCLUDED
22 #define ZYNADD_INTERNAL_H__A38C6254_E7AD_443E_AA5F_A5AB3FCB8B06__INCLUDED
24 #define LV2DYNPARAM_PARAMETER_TYPE_BOOL 1
25 #define LV2DYNPARAM_PARAMETER_TYPE_FLOAT 2
26 #define LV2DYNPARAM_PARAMETER_TYPE_INT 3
27 #define LV2DYNPARAM_PARAMETER_TYPE_ENUM 4
29 #define LV2DYNPARAM_PARAMETER_SCOPE_TYPE_ALWAYS 0 /* always visible, not interacting with other parameters */
30 #define LV2DYNPARAM_PARAMETER_SCOPE_TYPE_SHOW_OTHER 1 /* always visible bool, when true, other param appearing */
31 #define LV2DYNPARAM_PARAMETER_SCOPE_TYPE_HIDE_OTHER 2 /* always visible bool, when true, other param disappearing */
32 #define LV2DYNPARAM_PARAMETER_SCOPE_TYPE_SEMI 3 /* sometimes visible parameter */
34 #define LV2DYNPARAM_GROUP_INVALID -2
35 #define LV2DYNPARAM_GROUP_ROOT -1
37 #define HINT_HIDDEN "http://home.gna.org/zynjacku/hints#hidden"
38 #define HINT_TOGGLE_FLOAT "http://home.gna.org/zynjacku/hints#togglefloat"
39 #define HINT_ONE_SUBGROUP "http://home.gna.org/zynjacku/hints#onesubgroup"
41 #include "zynadd_dynparam_forest_map.h"
43 struct zynadd_parameter
45 struct list_head siblings;
46 struct zynadd * synth_ptr;
47 zyn_addsynth_component addsynth_component;
48 unsigned int addsynth_parameter; /* one of ZYNADD_PARAMETER_XXX */
49 unsigned int scope; /* one of LV2DYNPARAM_PARAMETER_SCOPE_TYPE_XXX */
50 struct zynadd_parameter * other_parameter; /* used for bools controling other parameters appear/disappear */
52 struct zynadd_group * parent_ptr; /* NULL for parameters, children of root */
53 const char * name_ptr; /* parameter name, points to somewhere in forest map */
54 unsigned int type; /* one of LV2DYNPARAM_PARAMETER_TYPE_XXX */
55 struct lv2dynparam_hints * hints_ptr; /* parameter hints, points to somewhere in forest map */
57 struct parameter_descriptor * map_element_ptr;
59 lv2dynparam_plugin_parameter lv2parameter;
62 struct zynadd_group
64 struct list_head siblings;
65 struct zynadd_group * parent_ptr; /* NULL for groups, children of root */
66 const char * name_ptr; /* group name, points to somewhere in forest map */
67 struct lv2dynparam_hints * hints_ptr; /* group hints, points to somewhere in forest map */
68 lv2dynparam_plugin_group lv2group;
71 struct zyn_forest_initializer
73 struct zyn_forest_map * map_ptr;
75 size_t groups_count;
76 size_t parameters_count;
78 struct zynadd_group ** groups;
79 struct zynadd_parameter ** parameters;
82 struct zynadd
84 double sample_rate;
85 char * bundle_path;
86 void ** ports;
88 zyn_addsynth_handle synth;
89 zyn_addsynth_component synth_global_components[ZYNADD_GLOBAL_COMPONENTS_COUNT];
90 zyn_addsynth_component synth_voice0_components[ZYNADD_VOICE_COMPONENTS_COUNT];
92 zyn_sample_type synth_output_left[SOUND_BUFFER_SIZE];
93 zyn_sample_type synth_output_right[SOUND_BUFFER_SIZE];
95 uint32_t synth_output_offset; /* offset of unread data within synth_output_xxx audio buffers */
97 lv2dynparam_plugin_instance dynparams;
99 struct list_head groups;
100 struct list_head parameters;
102 const LV2_Feature * const * host_features;
105 bool zynadd_dynparam_init(struct zynadd * zynadd_ptr);
107 void zynadd_dynparam_uninit(struct zynadd * zynadd_ptr);
109 bool
110 zynadd_appear_parameter(
111 struct zynadd * zynadd_ptr,
112 struct zynadd_parameter * parameter_ptr);
114 #endif /* #ifndef ZYNADD_INTERNAL_H__A38C6254_E7AD_443E_AA5F_A5AB3FCB8B06__INCLUDED */