Debian Codegraph @

ags/audio/fx/ags_fx_volume_channel.c

raw symbols SCIP
1 /* GSequencer - Advanced GTK Sequencer
2 * Copyright (C) 2005-2021 Joël Krähemann
3 *
4 * This file is part of GSequencer.
5 *
6 * GSequencer 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, either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * GSequencer is distributed in the hope that it will be useful,
12 * but 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 GSequencer. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #include <ags/audio/fx/ags_fx_volume_channel.h>cxx . . $ `<file>/ags/audio/fx/ags_fx_volume_channel.h`/
21
22 #include <ags/plugin/ags_plugin_port.h>cxx . . $ `<file>/ags/plugin/ags_plugin_port.h`/
23
24 #include <ags/i18n.h>cxx . . $ `<file>/ags/i18n.h`/
25
26 static void ags_fx_volume_channel_class_initcxx . . $ ags_fx_volume_channel_class_init(1fc9408e41c6b88).(AgsFxVolumeChannelClasscxx . . $ AgsFxVolumeChannelClass# *fx_volume_channel);
27 static void ags_fx_volume_channel_mutable_interface_initcxx . . $ ags_fx_volume_channel_mutable_interface_init(63b38f390ce03663).(AgsMutableInterfacecxx . . $ AgsMutableInterface# *mutable);
28 static void ags_fx_volume_channel_initcxx . . $ ags_fx_volume_channel_init(3452f217ba3d18b2).(AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel);
29 static void ags_fx_volume_channel_set_propertycxx . . $ ags_fx_volume_channel_set_property(d7c4bb29f36c0dc4).(GObjectcxx . . $ GObject# *gobject,
30 guintcxx . . $ guint# prop_id,
31 const GValuecxx . . $ GValue# *value,
32 GParamSpeccxx . . $ GParamSpec# *param_spec);
33 static void ags_fx_volume_channel_get_propertycxx . . $ ags_fx_volume_channel_get_property(cee2c52f22407c66).(GObjectcxx . . $ GObject# *gobject,
34 guintcxx . . $ guint# prop_id,
35 GValuecxx . . $ GValue# *value,
36 GParamSpeccxx . . $ GParamSpec# *param_spec);
37 static void ags_fx_volume_channel_disposecxx . . $ ags_fx_volume_channel_dispose(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject);
38 static void ags_fx_volume_channel_finalizecxx . . $ ags_fx_volume_channel_finalize(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject);
39
40 static void ags_fx_volume_channel_set_mutedcxx . . $ ags_fx_volume_channel_set_muted(11704ceada62ab27).(AgsMutablecxx . . $ AgsMutable# *mutable, gbooleancxx . . $ gboolean# muted);
41
42 static AgsPluginPortcxx . . $ AgsPluginPort#* ags_fx_volume_channel_get_muted_plugin_portcxx . . $ ags_fx_volume_channel_get_muted_plugin_port(34b69cdf8fd7ff84).();
43 static AgsPluginPortcxx . . $ AgsPluginPort#* ags_fx_volume_channel_get_volume_plugin_portcxx . . $ ags_fx_volume_channel_get_volume_plugin_port(34b69cdf8fd7ff84).();
44
45 /**
46 * SECTION:ags_fx_volume_channel
47 * @short_description: fx volume channel
48 * @title: AgsFxVolumeChannel
49 * @section_id:
50 * @include: ags/audio/fx/ags_fx_volume_channel.h
51 *
52 * The #AgsFxVolumeChannel class provides ports to the effect processor.
53 */
54
55 static gpointercxx . . $ gpointer# ags_fx_volume_channel_parent_classcxx . . $ ags_fx_volume_channel_parent_class. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
56
57 static const gcharcxx . . $ gchar# *ags_fx_volume_channel_plugin_namecxx . . $ ags_fx_volume_channel_plugin_name. = "ags-fx-volume";
58
59 static const gcharcxx . . $ gchar#* ags_fx_volume_channel_specifiercxx . . $ ags_fx_volume_channel_specifier.[] = {
60 "./muted[0]",
61 "./volume[0]",
62 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
63 };
64
65 static const gcharcxx . . $ gchar#* ags_fx_volume_channel_control_portcxx . . $ ags_fx_volume_channel_control_port.[] = {
66 "1/2",
67 "2/2",
68 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!,
69 };
70
71 enumcxx . . $ $anonymous_type_558ca73f88885e12_0#{
72 PROP_0cxx . . $ PROP_0.,
73 PROP_MUTEDcxx . . $ PROP_MUTED.,
74 PROP_VOLUMEcxx . . $ PROP_VOLUME.,
75 };
76
77 GTypecxx . . $ GType#
78 ags_fx_volume_channel_get_typecxx . . $ ags_fx_volume_channel_get_type(7b3bcd0168edf51f).()
79 {
80 static gsizecxx . . $ gsize# g_define_type_id__static = 0;
81
82 if(g_once_init_entercxx . . $ `<external>/457917468643292165/gthread.h:270:10`!(&g_define_type_id__static)){
83 GTypecxx . . $ GType# ags_type_fx_volume_channel = 0;
84
85 static const GTypeInfocxx . . $ GTypeInfo# ags_fx_volume_channel_info = {
86 sizeof (AgsFxVolumeChannelClasscxx . . $ AgsFxVolumeChannelClass#),
87 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* base_init */
88 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* base_finalize */
89 (GClassInitFunccxx . . $ GClassInitFunc#) ags_fx_volume_channel_class_initcxx . . $ ags_fx_volume_channel_class_init(1fc9408e41c6b88).,
90 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* class_finalize */
91 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* class_channel */
92 sizeof (AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel#),
93 0, /* n_preallocs */
94 (GInstanceInitFunccxx . . $ GInstanceInitFunc#) ags_fx_volume_channel_initcxx . . $ ags_fx_volume_channel_init(3452f217ba3d18b2).,
95 };
96
97 static const GInterfaceInfocxx . . $ GInterfaceInfo# ags_mutable_interface_info = {
98 (GInterfaceInitFunccxx . . $ GInterfaceInitFunc#) ags_fx_volume_channel_mutable_interface_initcxx . . $ ags_fx_volume_channel_mutable_interface_init(63b38f390ce03663).,
99 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* interface_finalize */
100 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!, /* interface_data */
101 };
102
103 ags_type_fx_volume_channel = g_type_register_staticcxx . . $ g_type_register_static(805a40cfa272e950).(AGS_TYPE_RECALL_CHANNELcxx . . $ `ags/audio/ags_recall_channel.h:34:9`!,
104 "AgsFxVolumeChannel",
105 &ags_fx_volume_channel_info,
106 0);
107
108 g_type_add_interface_staticcxx . . $ g_type_add_interface_static(242860dc27e79bd1).(ags_type_fx_volume_channel,
109 AGS_TYPE_MUTABLEcxx . . $ `ags/object/ags_mutable.h:28:9`!,
110 &ags_mutable_interface_info);
111
112 g_once_init_leavecxx . . $ `<external>/457917468643292165/gthread.h:277:10`!(&g_define_type_id__static, ags_type_fx_volume_channel);
113 }
114
115 return(g_define_type_id__static);
116 }
117
118 void
119 ags_fx_volume_channel_class_initcxx . . $ ags_fx_volume_channel_class_init(1fc9408e41c6b88).(AgsFxVolumeChannelClasscxx . . $ AgsFxVolumeChannelClass# *fx_volume_channel)
120 {
121 GObjectClasscxx . . $ GObjectClass# *gobject;
122
123 GParamSpeccxx . . $ GParamSpec# *param_spec;
124
125 ags_fx_volume_channel_parent_classcxx . . $ ags_fx_volume_channel_parent_class. = g_type_class_peek_parentcxx . . $ g_type_class_peek_parent(9f162e79bfc6c74).(fx_volume_channel);
126
127 /* GObjectClass */
128 gobject = (GObjectClasscxx . . $ GObjectClass# *) fx_volume_channel;
129
130 gobject->set_propertycxx . . $ _GObjectClass#set_property. = ags_fx_volume_channel_set_propertycxx . . $ ags_fx_volume_channel_set_property(d7c4bb29f36c0dc4).;
131 gobject->get_propertycxx . . $ _GObjectClass#get_property. = ags_fx_volume_channel_get_propertycxx . . $ ags_fx_volume_channel_get_property(cee2c52f22407c66).;
132
133 gobject->disposecxx . . $ _GObjectClass#dispose. = ags_fx_volume_channel_disposecxx . . $ ags_fx_volume_channel_dispose(6087475fa43034d3).;
134 gobject->finalizecxx . . $ _GObjectClass#finalize. = ags_fx_volume_channel_finalizecxx . . $ ags_fx_volume_channel_finalize(6087475fa43034d3).;
135
136 /* properties */
137 /**
138 * AgsFxVolumeChannel:muted:
139 *
140 * The muted port.
141 *
142 * Since: 3.3.0
143 */
144 param_spec = g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127).("muted",
145 i18n_pspeccxx . . $ `ags/i18n.h:24:9`!("muted of recall"),
146 i18n_pspeccxx . . $ `ags/i18n.h:24:9`!("The recall's muted"),
147 AGS_TYPE_PORTcxx . . $ `ags/audio/ags_port.h:32:9`!,
148 G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. | G_PARAM_WRITABLEcxx . . $ G_PARAM_WRITABLE.);
149 g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26).(gobject,
150 PROP_MUTEDcxx . . $ PROP_MUTED.,
151 param_spec);
152
153 /**
154 * AgsFxVolumeChannel:volume:
155 *
156 * The volume port.
157 *
158 * Since: 3.3.0
159 */
160 param_spec = g_param_spec_objectcxx . . $ g_param_spec_object(faf99966f027a127).("volume",
161 i18n_pspeccxx . . $ `ags/i18n.h:24:9`!("volume of recall"),
162 i18n_pspeccxx . . $ `ags/i18n.h:24:9`!("The recall's volume"),
163 AGS_TYPE_PORTcxx . . $ `ags/audio/ags_port.h:32:9`!,
164 G_PARAM_READABLEcxx . . $ G_PARAM_READABLE. | G_PARAM_WRITABLEcxx . . $ G_PARAM_WRITABLE.);
165 g_object_class_install_propertycxx . . $ g_object_class_install_property(9c80cb614dbe5a26).(gobject,
166 PROP_VOLUMEcxx . . $ PROP_VOLUME.,
167 param_spec);
168 }
169
170 void
171 ags_fx_volume_channel_mutable_interface_initcxx . . $ ags_fx_volume_channel_mutable_interface_init(63b38f390ce03663).(AgsMutableInterfacecxx . . $ AgsMutableInterface# *mutable)
172 {
173 mutable->set_mutedcxx . . $ _AgsMutableInterface#set_muted. = ags_fx_volume_channel_set_mutedcxx . . $ ags_fx_volume_channel_set_muted(11704ceada62ab27).;
174 }
175
176 void
177 ags_fx_volume_channel_initcxx . . $ ags_fx_volume_channel_init(3452f217ba3d18b2).(AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel)
178 {
179 AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:42:9`!(fx_volume_channel)->namecxx . . $ _AgsRecall#name. = "ags-fx-volume";
180 AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:42:9`!(fx_volume_channel)->versioncxx . . $ _AgsRecall#version. = AGS_RECALL_DEFAULT_VERSIONcxx . . $ `ags/audio/ags_recall.h:52:9`!;
181 AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:42:9`!(fx_volume_channel)->build_idcxx . . $ _AgsRecall#build_id. = AGS_RECALL_DEFAULT_BUILD_IDcxx . . $ `ags/audio/ags_recall.h:53:9`!;
182 AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:42:9`!(fx_volume_channel)->xml_typecxx . . $ _AgsRecall#xml_type. = "ags-fx-volume-channel";
183
184 /* muted */
185 fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78).(AGS_TYPE_PORTcxx . . $ `ags/audio/ags_port.h:32:9`!,
186 "plugin-name", ags_fx_volume_channel_plugin_namecxx . . $ ags_fx_volume_channel_plugin_name.,
187 "specifier", "./muted[0]",
188 "control-port", "1/2",
189 "port-value-is-pointer", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
190 "port-value-type", G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!,
191 "port-value-size", sizeof(gfloatcxx . . $ gfloat#),
192 "port-value-length", 1,
193 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
194
195 fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted.->port_valuecxx . . $ _AgsPort#port_value..ags_port_floatcxx . . $ _AgsPortValue#ags_port_float. = (gfloatcxx . . $ gfloat#) FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!;
196
197 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d).(fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted.,
198 "plugin-port", ags_fx_volume_channel_get_muted_plugin_portcxx . . $ ags_fx_volume_channel_get_muted_plugin_port(34b69cdf8fd7ff84).(),
199 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
200
201 ags_recall_add_portcxx . . $ ags_recall_add_port(6ead69b5866ab1f9).((AgsRecallcxx . . $ AgsRecall# *) fx_volume_channel,
202 fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted.);
203
204 /* volume */
205 fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78).(AGS_TYPE_PORTcxx . . $ `ags/audio/ags_port.h:32:9`!,
206 "plugin-name", ags_fx_volume_channel_plugin_namecxx . . $ ags_fx_volume_channel_plugin_name.,
207 "specifier", "./volume[0]",
208 "control-port", "2/2",
209 "port-value-is-pointer", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!,
210 "port-value-type", G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!,
211 "port-value-size", sizeof(gfloatcxx . . $ gfloat#),
212 "port-value-length", 1,
213 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
214
215 fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume.->port_valuecxx . . $ _AgsPort#port_value..ags_port_floatcxx . . $ _AgsPortValue#ags_port_float. = (gfloatcxx . . $ gfloat#) 1.0;
216
217 g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d).(fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume.,
218 "plugin-port", ags_fx_volume_channel_get_volume_plugin_portcxx . . $ ags_fx_volume_channel_get_volume_plugin_port(34b69cdf8fd7ff84).(),
219 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
220
221 ags_recall_add_portcxx . . $ ags_recall_add_port(6ead69b5866ab1f9).((AgsRecallcxx . . $ AgsRecall# *) fx_volume_channel,
222 fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume.);
223 }
224
225 void
226 ags_fx_volume_channel_set_propertycxx . . $ ags_fx_volume_channel_set_property(d7c4bb29f36c0dc4).(GObjectcxx . . $ GObject# *gobject,
227 guintcxx . . $ guint# prop_id,
228 const GValuecxx . . $ GValue# *value,
229 GParamSpeccxx . . $ GParamSpec# *param_spec)
230 {
231 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel;
232
233 GRecMutexcxx . . $ GRecMutex# *recall_mutex;
234
235 fx_volume_channel = AGS_FX_VOLUME_CHANNELcxx . . $ `ags/audio/fx/ags_fx_volume_channel.h:34:9`!(gobject);
236
237 /* get recall mutex */
238 recall_mutex = AGS_RECALL_GET_OBJ_MUTEXcxx . . $ `ags/audio/ags_recall.h:50:9`!(fx_volume_channel);
239
240 switch(prop_id){
241 case PROP_MUTEDcxx . . $ PROP_MUTED.:
242 {
243 AgsPortcxx . . $ AgsPort# *port;
244
245 port = (AgsPortcxx . . $ AgsPort# *) g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce).(value);
246
247 g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(recall_mutex);
248
249 if(port == fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted.){
250 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
251
252 return;
253 }
254
255 if(fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
256 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->muted));
257 }
258
259 if(port != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
260 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`!(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(port));
261 }
262
263 fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. = port;
264
265 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
266 }
267 break;
268 case PROP_VOLUMEcxx . . $ PROP_VOLUME.:
269 {
270 AgsPortcxx . . $ AgsPort# *port;
271
272 port = (AgsPortcxx . . $ AgsPort# *) g_value_get_objectcxx . . $ g_value_get_object(e12dff36056c2cce).(value);
273
274 g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(recall_mutex);
275
276 if(port == fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume.){
277 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
278
279 return;
280 }
281
282 if(fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
283 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->volume));
284 }
285
286 if(port != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
287 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`!(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(port));
288 }
289
290 fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. = port;
291
292 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
293 }
294 break;
295 default:
296 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`!(gobject, prop_id, param_spec);
297 break;
298 }
299 }
300
301 void
302 ags_fx_volume_channel_get_propertycxx . . $ ags_fx_volume_channel_get_property(cee2c52f22407c66).(GObjectcxx . . $ GObject# *gobject,
303 guintcxx . . $ guint# prop_id,
304 GValuecxx . . $ GValue# *value,
305 GParamSpeccxx . . $ GParamSpec# *param_spec)
306 {
307 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel;
308
309 GRecMutexcxx . . $ GRecMutex# *recall_mutex;
310
311 fx_volume_channel = AGS_FX_VOLUME_CHANNELcxx . . $ `ags/audio/fx/ags_fx_volume_channel.h:34:9`!(gobject);
312
313 /* get recall mutex */
314 recall_mutex = AGS_RECALL_GET_OBJ_MUTEXcxx . . $ `ags/audio/ags_recall.h:50:9`!(fx_volume_channel);
315
316 switch(prop_id){
317 case PROP_MUTEDcxx . . $ PROP_MUTED.:
318 {
319 g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(recall_mutex);
320
321 g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f).(value, fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted.);
322
323 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
324 }
325 break;
326 case PROP_VOLUMEcxx . . $ PROP_VOLUME.:
327 {
328 g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(recall_mutex);
329
330 g_value_set_objectcxx . . $ g_value_set_object(e945b84c1e9702f).(value, fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume.);
331
332 g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(recall_mutex);
333 }
334 break;
335 default:
336 G_OBJECT_WARN_INVALID_PROPERTY_IDcxx . . $ `<external>/1341695927569185362/gobject.h:690:9`!(gobject, prop_id, param_spec);
337 break;
338 }
339 }
340
341 void
342 ags_fx_volume_channel_disposecxx . . $ ags_fx_volume_channel_dispose(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject)
343 {
344 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel;
345
346 fx_volume_channel = AGS_FX_VOLUME_CHANNELcxx . . $ `ags/audio/fx/ags_fx_volume_channel.h:34:9`!(gobject);
347
348 /* muted */
349 if(fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
350 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->muted));
351
352 fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
353 }
354
355 /* volume */
356 if(fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
357 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->volume));
358
359 fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
360 }
361
362 /* call parent */
363 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`!(ags_fx_volume_channel_parent_class)->disposecxx . . $ _GObjectClass#dispose.(gobject);
364 }
365
366 void
367 ags_fx_volume_channel_finalizecxx . . $ ags_fx_volume_channel_finalize(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject)
368 {
369 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel;
370
371 fx_volume_channel = AGS_FX_VOLUME_CHANNELcxx . . $ `ags/audio/fx/ags_fx_volume_channel.h:34:9`!(gobject);
372
373 /* muted */
374 if(fx_volume_channel->mutedcxx . . $ _AgsFxVolumeChannel#muted. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
375 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->muted));
376 }
377
378 /* volume */
379 if(fx_volume_channel->volumecxx . . $ _AgsFxVolumeChannel#volume. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
380 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(fx_volume_channel->volume));
381 }
382
383 /* call parent */
384 G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`!(ags_fx_volume_channel_parent_class)->finalizecxx . . $ _GObjectClass#finalize.(gobject);
385 }
386
387 void
388 ags_fx_volume_channel_set_mutedcxx . . $ ags_fx_volume_channel_set_muted(11704ceada62ab27).(AgsMutablecxx . . $ AgsMutable# *mutable, gbooleancxx . . $ gboolean# muted)
389 {
390 AgsPortcxx . . $ AgsPort# *port;
391
392 GValuecxx . . $ GValue# value = {0,};
393
394 g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(G_OBJECTcxx . . $ `<external>/1341695927569185362/gobject.h:54:9`!(mutable),
395 "muted", &port,
396 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
397
398 g_value_initcxx . . $ g_value_init(afc049a76445919c).(&value,
399 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
400
401 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(&value,
402 (muted ? 1.0: 0.0));
403
404 ags_port_safe_writecxx . . $ ags_port_safe_write(3f8c7b03f2be4a83).(port,
405 &value);
406
407 g_value_unsetcxx . . $ g_value_unset(15c06aff79890746).(&value);
408 g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(port);
409 }
410
411 static AgsPluginPortcxx . . $ AgsPluginPort#*
412 ags_fx_volume_channel_get_muted_plugin_portcxx . . $ ags_fx_volume_channel_get_muted_plugin_port(34b69cdf8fd7ff84).()
413 {
414 static AgsPluginPortcxx . . $ AgsPluginPort# *plugin_port = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
415
416 static GMutexcxx . . $ GMutex# mutex;
417
418 g_mutex_lockcxx . . $ g_mutex_lock(d80b1953a7cb7fd1).(&mutex);
419
420 if(plugin_port == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
421 plugin_port = ags_plugin_port_newcxx . . $ ags_plugin_port_new(34b69cdf8fd7ff84).();
422 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`!(plugin_port);
423
424 plugin_port->flagscxx . . $ _AgsPluginPort#flags. |= (AGS_PLUGIN_PORT_INPUTcxx . . $ AGS_PLUGIN_PORT_INPUT. |
425 AGS_PLUGIN_PORT_CONTROLcxx . . $ AGS_PLUGIN_PORT_CONTROL. |
426 AGS_PLUGIN_PORT_TOGGLEDcxx . . $ AGS_PLUGIN_PORT_TOGGLED.);
427
428 plugin_port->port_indexcxx . . $ _AgsPluginPort#port_index. = 0;
429
430 /* range */
431 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->default_valuecxx . . $ _AgsPluginPort#default_value.,
432 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
433 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->lower_valuecxx . . $ _AgsPluginPort#lower_value.,
434 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
435 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->upper_valuecxx . . $ _AgsPluginPort#upper_value.,
436 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
437
438 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->default_valuecxx . . $ _AgsPluginPort#default_value.,
439 0.0);
440 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->lower_valuecxx . . $ _AgsPluginPort#lower_value.,
441 0.0);
442 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->upper_valuecxx . . $ _AgsPluginPort#upper_value.,
443 1.0);
444 }
445
446 g_mutex_unlockcxx . . $ g_mutex_unlock(d80b1953a7cb7fd1).(&mutex);
447
448 return(plugin_port);
449 }
450
451 static AgsPluginPortcxx . . $ AgsPluginPort#*
452 ags_fx_volume_channel_get_volume_plugin_portcxx . . $ ags_fx_volume_channel_get_volume_plugin_port(34b69cdf8fd7ff84).()
453 {
454 static AgsPluginPortcxx . . $ AgsPluginPort# *plugin_port = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!;
455
456 static GMutexcxx . . $ GMutex# mutex;
457
458 g_mutex_lockcxx . . $ g_mutex_lock(d80b1953a7cb7fd1).(&mutex);
459
460 if(plugin_port == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!){
461 plugin_port = ags_plugin_port_newcxx . . $ ags_plugin_port_new(34b69cdf8fd7ff84).();
462 g_object_refcxx . . $ `<external>/1341695927569185362/gobject.h:533:9`!(plugin_port);
463
464 plugin_port->flagscxx . . $ _AgsPluginPort#flags. |= (AGS_PLUGIN_PORT_INPUTcxx . . $ AGS_PLUGIN_PORT_INPUT. |
465 AGS_PLUGIN_PORT_CONTROLcxx . . $ AGS_PLUGIN_PORT_CONTROL.);
466
467 plugin_port->port_indexcxx . . $ _AgsPluginPort#port_index. = 0;
468
469 /* range */
470 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->default_valuecxx . . $ _AgsPluginPort#default_value.,
471 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
472 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->lower_valuecxx . . $ _AgsPluginPort#lower_value.,
473 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
474 g_value_initcxx . . $ g_value_init(afc049a76445919c).(plugin_port->upper_valuecxx . . $ _AgsPluginPort#upper_value.,
475 G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!);
476
477 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->default_valuecxx . . $ _AgsPluginPort#default_value.,
478 1.0);
479 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->lower_valuecxx . . $ _AgsPluginPort#lower_value.,
480 0.0);
481 g_value_set_floatcxx . . $ g_value_set_float(b22d5fe81e4f0ffb).(plugin_port->upper_valuecxx . . $ _AgsPluginPort#upper_value.,
482 2.0);
483 }
484
485 g_mutex_unlockcxx . . $ g_mutex_unlock(d80b1953a7cb7fd1).(&mutex);
486
487 return(plugin_port);
488 }
489
490 /**
491 * ags_fx_volume_channel_new:
492 * @channel: the #AgsChannel
493 *
494 * Create a new instance of #AgsFxVolumeChannel
495 *
496 * Returns: the new #AgsFxVolumeChannel
497 *
498 * Since: 3.3.0
499 */
500 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel#*
501 ags_fx_volume_channel_newcxx . . $ ags_fx_volume_channel_new(94e2f0cbb95397e4).(AgsChannelcxx . . $ AgsChannel# *channel)
502 {
503 AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *fx_volume_channel;
504
505 fx_volume_channel = (AgsFxVolumeChannelcxx . . $ AgsFxVolumeChannel# *) g_object_newcxx . . $ g_object_new(8485fe61b4be4c78).(AGS_TYPE_FX_VOLUME_CHANNELcxx . . $ `ags/audio/fx/ags_fx_volume_channel.h:33:9`!,
506 "source", channel,
507 NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/16/include/stddef.h:419:9`!);
508
509 return(fx_volume_channel);
510 }