| 1 | /* GSequencer - Advanced GTK Sequencer |
| 2 | * Copyright (C) 2005-2020 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_dssi_channel.h>cxx . . $ `<file>/ags/audio/fx/ags_fx_dssi_channel.h`/ |
| 21 | |
| 22 | #include <ags/plugin/ags_dssi_manager.h>cxx . . $ `<file>/ags/plugin/ags_dssi_manager.h`/ |
| 23 | #include <ags/plugin/ags_dssi_plugin.h>cxx . . $ `<file>/ags/plugin/ags_dssi_plugin.h`/ |
| 24 | #include <ags/plugin/ags_base_plugin.h>cxx . . $ `<file>/ags/plugin/ags_base_plugin.h`/ |
| 25 | #include <ags/plugin/ags_plugin_port.h>cxx . . $ `<file>/ags/plugin/ags_plugin_port.h`/ |
| 26 | |
| 27 | #include <ags/audio/ags_port_util.h>cxx . . $ `<file>/ags/audio/ags_port_util.h`/ |
| 28 | |
| 29 | #include <ags/audio/fx/ags_fx_dssi_audio.h>cxx . . $ `<file>/ags/audio/fx/ags_fx_dssi_audio.h`/ |
| 30 | |
| 31 | void ags_fx_dssi_channel_class_initcxx . . $ ags_fx_dssi_channel_class_init(e5e6370334f56e13).(AgsFxDssiChannelClasscxx . . $ AgsFxDssiChannelClass# *fx_dssi_channel); |
| 32 | void ags_fx_dssi_channel_initcxx . . $ ags_fx_dssi_channel_init(bbf12f0cb5b342f5).(AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel); |
| 33 | void ags_fx_dssi_channel_disposecxx . . $ ags_fx_dssi_channel_dispose(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject); |
| 34 | void ags_fx_dssi_channel_finalizecxx . . $ ags_fx_dssi_channel_finalize(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject); |
| 35 | |
| 36 | /** |
| 37 | * SECTION:ags_fx_dssi_channel |
| 38 | * @short_description: fx dssi channel |
| 39 | * @title: AgsFxDssiChannel |
| 40 | * @section_id: |
| 41 | * @include: ags/audio/fx/ags_fx_dssi_channel.h |
| 42 | * |
| 43 | * The #AgsFxDssiChannel class provides ports to the effect processor. |
| 44 | */ |
| 45 | |
| 46 | static gpointercxx . . $ gpointer# ags_fx_dssi_channel_parent_classcxx . . $ ags_fx_dssi_channel_parent_class. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 47 | |
| 48 | const gcharcxx . . $ gchar# *ags_fx_dssi_channel_plugin_namecxx . . $ ags_fx_dssi_channel_plugin_name. = "ags-fx-dssi"; |
| 49 | |
| 50 | GTypecxx . . $ GType# |
| 51 | ags_fx_dssi_channel_get_typecxx . . $ ags_fx_dssi_channel_get_type(7b3bcd0168edf51f).() |
| 52 | { |
| 53 | static gsizecxx . . $ gsize# g_define_type_id__static = 0; |
| 54 | |
| 55 | if(g_once_init_entercxx . . $ `<external>/457917468643292165/gthread.h:270:10`!(&g_define_type_id__static)){ |
| 56 | GTypecxx . . $ GType# ags_type_fx_dssi_channel = 0; |
| 57 | |
| 58 | static const GTypeInfocxx . . $ GTypeInfo# ags_fx_dssi_channel_info = { |
| 59 | sizeof (AgsFxDssiChannelClasscxx . . $ AgsFxDssiChannelClass#), |
| 60 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, /* base_init */ |
| 61 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, /* base_finalize */ |
| 62 | (GClassInitFunccxx . . $ GClassInitFunc#) ags_fx_dssi_channel_class_initcxx . . $ ags_fx_dssi_channel_class_init(e5e6370334f56e13)., |
| 63 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, /* class_finalize */ |
| 64 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!, /* class_channel */ |
| 65 | sizeof (AgsFxDssiChannelcxx . . $ AgsFxDssiChannel#), |
| 66 | 0, /* n_preallocs */ |
| 67 | (GInstanceInitFunccxx . . $ GInstanceInitFunc#) ags_fx_dssi_channel_initcxx . . $ ags_fx_dssi_channel_init(bbf12f0cb5b342f5)., |
| 68 | }; |
| 69 | |
| 70 | ags_type_fx_dssi_channel = g_type_register_staticcxx . . $ g_type_register_static(805a40cfa272e950).(AGS_TYPE_FX_NOTATION_CHANNELcxx . . $ `ags/audio/fx/ags_fx_notation_channel.h:33:9`!, |
| 71 | "AgsFxDssiChannel", |
| 72 | &ags_fx_dssi_channel_info, |
| 73 | 0); |
| 74 | |
| 75 | g_once_init_leavecxx . . $ `<external>/457917468643292165/gthread.h:277:10`!(&g_define_type_id__static, ags_type_fx_dssi_channel); |
| 76 | } |
| 77 | |
| 78 | return(g_define_type_id__static); |
| 79 | } |
| 80 | |
| 81 | void |
| 82 | ags_fx_dssi_channel_class_initcxx . . $ ags_fx_dssi_channel_class_init(e5e6370334f56e13).(AgsFxDssiChannelClasscxx . . $ AgsFxDssiChannelClass# *fx_dssi_channel) |
| 83 | { |
| 84 | GObjectClasscxx . . $ GObjectClass# *gobject; |
| 85 | |
| 86 | ags_fx_dssi_channel_parent_classcxx . . $ ags_fx_dssi_channel_parent_class. = g_type_class_peek_parentcxx . . $ g_type_class_peek_parent(9f162e79bfc6c74).(fx_dssi_channel); |
| 87 | |
| 88 | /* GObjectClass */ |
| 89 | gobject = (GObjectClasscxx . . $ GObjectClass# *) fx_dssi_channel; |
| 90 | |
| 91 | gobject->disposecxx . . $ _GObjectClass#dispose. = ags_fx_dssi_channel_disposecxx . . $ ags_fx_dssi_channel_dispose(6087475fa43034d3).; |
| 92 | gobject->finalizecxx . . $ _GObjectClass#finalize. = ags_fx_dssi_channel_finalizecxx . . $ ags_fx_dssi_channel_finalize(6087475fa43034d3).; |
| 93 | } |
| 94 | |
| 95 | void |
| 96 | ags_fx_dssi_channel_initcxx . . $ ags_fx_dssi_channel_init(bbf12f0cb5b342f5).(AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel) |
| 97 | { |
| 98 | AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:41:9`!(fx_dssi_channel)->namecxx . . $ _AgsRecall#name. = "ags-fx-dssi"; |
| 99 | AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:41:9`!(fx_dssi_channel)->versioncxx . . $ _AgsRecall#version. = AGS_RECALL_DEFAULT_VERSIONcxx . . $ `ags/audio/ags_recall.h:137:9`!; |
| 100 | AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:41:9`!(fx_dssi_channel)->build_idcxx . . $ _AgsRecall#build_id. = AGS_RECALL_DEFAULT_BUILD_IDcxx . . $ `ags/audio/ags_recall.h:138:9`!; |
| 101 | AGS_RECALLcxx . . $ `ags/audio/ags_recall.h:41:9`!(fx_dssi_channel)->xml_typecxx . . $ _AgsRecall#xml_type. = "ags-fx-dssi-channel"; |
| 102 | |
| 103 | fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port. = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 104 | } |
| 105 | |
| 106 | void |
| 107 | ags_fx_dssi_channel_disposecxx . . $ ags_fx_dssi_channel_dispose(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject) |
| 108 | { |
| 109 | AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel; |
| 110 | |
| 111 | fx_dssi_channel = AGS_FX_DSSI_CHANNELcxx . . $ `ags/audio/fx/ags_fx_dssi_channel.h:35:9`!(gobject); |
| 112 | |
| 113 | /* call parent */ |
| 114 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`!(ags_fx_dssi_channel_parent_class)->disposecxx . . $ _GObjectClass#dispose.(gobject); |
| 115 | } |
| 116 | |
| 117 | void |
| 118 | ags_fx_dssi_channel_finalizecxx . . $ ags_fx_dssi_channel_finalize(6087475fa43034d3).(GObjectcxx . . $ GObject# *gobject) |
| 119 | { |
| 120 | AgsPortcxx . . $ AgsPort# **iter; |
| 121 | AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel; |
| 122 | |
| 123 | fx_dssi_channel = AGS_FX_DSSI_CHANNELcxx . . $ `ags/audio/fx/ags_fx_dssi_channel.h:35:9`!(gobject); |
| 124 | |
| 125 | if(fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 126 | for(iter = fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port.; iter[0] != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; iter++){ |
| 127 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(iter[0]); |
| 128 | } |
| 129 | |
| 130 | g_freecxx . . $ g_free(5d22bdacc48458e8).(fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port.); |
| 131 | } |
| 132 | |
| 133 | /* call parent */ |
| 134 | G_OBJECT_CLASScxx . . $ `<external>/1341695927569185362/gobject.h:61:9`!(ags_fx_dssi_channel_parent_class)->finalizecxx . . $ _GObjectClass#finalize.(gobject); |
| 135 | } |
| 136 | |
| 137 | /** |
| 138 | * ags_fx_dssi_channel_load_port: |
| 139 | * @fx_dssi_channel: the #AgsFxDssiChannel |
| 140 | * |
| 141 | * Load port of @fx_dssi_channel. |
| 142 | * |
| 143 | * Since: 3.3.0 |
| 144 | */ |
| 145 | void |
| 146 | ags_fx_dssi_channel_load_portcxx . . $ ags_fx_dssi_channel_load_port(bbf12f0cb5b342f5).(AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel) |
| 147 | { |
| 148 | AgsChannelcxx . . $ AgsChannel# *input; |
| 149 | AgsFxDssiAudiocxx . . $ AgsFxDssiAudio# *fx_dssi_audio; |
| 150 | AgsPortcxx . . $ AgsPort# **dssi_port; |
| 151 | |
| 152 | AgsDssiPlugincxx . . $ AgsDssiPlugin# *dssi_plugin; |
| 153 | |
| 154 | GListcxx . . $ GList# *start_plugin_port, *plugin_port; |
| 155 | |
| 156 | guintcxx . . $ guint# *output_port; |
| 157 | guintcxx . . $ guint# *input_port; |
| 158 | |
| 159 | guintcxx . . $ guint# audio_channel; |
| 160 | guintcxx . . $ guint# pad; |
| 161 | guintcxx . . $ guint# output_port_count, input_port_count; |
| 162 | guintcxx . . $ guint# control_port_count; |
| 163 | guintcxx . . $ guint# buffer_size; |
| 164 | guintcxx . . $ guint# nth; |
| 165 | guintcxx . . $ guint# i, j; |
| 166 | gbooleancxx . . $ gboolean# is_live_instrument; |
| 167 | |
| 168 | GRecMutexcxx . . $ GRecMutex# *fx_dssi_audio_mutex; |
| 169 | GRecMutexcxx . . $ GRecMutex# *fx_dssi_channel_mutex; |
| 170 | |
| 171 | if(!AGS_IS_FX_DSSI_CHANNELcxx . . $ `ags/audio/fx/ags_fx_dssi_channel.h:37:9`!(fx_dssi_channel)){ |
| 172 | return; |
| 173 | } |
| 174 | |
| 175 | fx_dssi_channel_mutex = AGS_RECALL_GET_OBJ_MUTEXcxx . . $ `ags/audio/ags_recall.h:49:9`!(fx_dssi_channel); |
| 176 | |
| 177 | g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 178 | |
| 179 | if(fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port. != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 180 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 181 | |
| 182 | return; |
| 183 | } |
| 184 | |
| 185 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 186 | |
| 187 | fx_dssi_audio = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 188 | |
| 189 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(fx_dssi_channel, |
| 190 | "recall-audio", &fx_dssi_audio, |
| 191 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 192 | |
| 193 | if(fx_dssi_audio == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 194 | return; |
| 195 | } |
| 196 | |
| 197 | is_live_instrument = ags_fx_dssi_audio_test_flagscxx . . $ ags_fx_dssi_audio_test_flags(ae925937a6cdb90).(fx_dssi_audio, AGS_FX_DSSI_AUDIO_LIVE_INSTRUMENTcxx . . $ AGS_FX_DSSI_AUDIO_LIVE_INSTRUMENT.); |
| 198 | |
| 199 | if(is_live_instrument){ |
| 200 | if(fx_dssi_audio != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 201 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(fx_dssi_audio); |
| 202 | } |
| 203 | |
| 204 | return; |
| 205 | } |
| 206 | |
| 207 | /* get recall mutex */ |
| 208 | fx_dssi_audio_mutex = AGS_RECALL_GET_OBJ_MUTEXcxx . . $ `ags/audio/ags_recall.h:49:9`!(fx_dssi_audio); |
| 209 | |
| 210 | input = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 211 | |
| 212 | buffer_size = AGS_SOUNDCARD_DEFAULT_BUFFER_SIZEcxx . . $ `ags/object/ags_soundcard.h:51:9`!; |
| 213 | |
| 214 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(fx_dssi_channel, |
| 215 | "source", &input, |
| 216 | "buffer-size", &buffer_size, |
| 217 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 218 | |
| 219 | audio_channel = 0; |
| 220 | pad = 0; |
| 221 | |
| 222 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(input, |
| 223 | "audio-channel", &audio_channel, |
| 224 | "pad", &pad, |
| 225 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 226 | |
| 227 | /* get DSSI plugin */ |
| 228 | g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(fx_dssi_audio_mutex); |
| 229 | |
| 230 | dssi_plugin = fx_dssi_audio->dssi_plugincxx . . $ _AgsFxDssiAudio#dssi_plugin.; |
| 231 | |
| 232 | output_port_count = fx_dssi_audio->output_port_countcxx . . $ _AgsFxDssiAudio#output_port_count.; |
| 233 | output_port = fx_dssi_audio->output_portcxx . . $ _AgsFxDssiAudio#output_port.; |
| 234 | |
| 235 | input_port_count = fx_dssi_audio->input_port_countcxx . . $ _AgsFxDssiAudio#input_port_count.; |
| 236 | input_port = fx_dssi_audio->input_portcxx . . $ _AgsFxDssiAudio#input_port.; |
| 237 | |
| 238 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(fx_dssi_audio_mutex); |
| 239 | |
| 240 | /* get DSSI port */ |
| 241 | g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 242 | |
| 243 | dssi_port = fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port.; |
| 244 | |
| 245 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 246 | |
| 247 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(dssi_plugin, |
| 248 | "plugin-port", &start_plugin_port, |
| 249 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 250 | |
| 251 | /* get control port count */ |
| 252 | plugin_port = start_plugin_port; |
| 253 | |
| 254 | control_port_count = 0; |
| 255 | |
| 256 | while(plugin_port != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 257 | if(ags_plugin_port_test_flagscxx . . $ ags_plugin_port_test_flags(af71b240cf69617a).(plugin_port->datacxx . . $ _GList#data., |
| 258 | AGS_PLUGIN_PORT_CONTROLcxx . . $ AGS_PLUGIN_PORT_CONTROL.)){ |
| 259 | control_port_count++; |
| 260 | } |
| 261 | |
| 262 | plugin_port = plugin_port->nextcxx . . $ _GList#next.; |
| 263 | } |
| 264 | |
| 265 | /* */ |
| 266 | if(control_port_count > 0){ |
| 267 | dssi_port = (AgsPortcxx . . $ AgsPort# **) g_malloccxx . . $ g_malloc(bfcfa4d6b7f7ef64).((control_port_count + 1) * sizeof(AgsPortcxx . . $ AgsPort# *)); |
| 268 | |
| 269 | plugin_port = start_plugin_port; |
| 270 | |
| 271 | for(nth = 0; nth < control_port_count && plugin_port != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!;){ |
| 272 | if(ags_plugin_port_test_flagscxx . . $ ags_plugin_port_test_flags(af71b240cf69617a).(plugin_port->datacxx . . $ _GList#data., |
| 273 | AGS_PLUGIN_PORT_CONTROLcxx . . $ AGS_PLUGIN_PORT_CONTROL.)){ |
| 274 | AgsPluginPortcxx . . $ AgsPluginPort# *current_plugin_port; |
| 275 | |
| 276 | gcharcxx . . $ gchar# *plugin_name; |
| 277 | gcharcxx . . $ gchar# *specifier; |
| 278 | gcharcxx . . $ gchar# *control_port; |
| 279 | |
| 280 | guintcxx . . $ guint# port_index; |
| 281 | |
| 282 | GValuecxx . . $ GValue# default_value = {0,}; |
| 283 | |
| 284 | GRecMutexcxx . . $ GRecMutex# *plugin_port_mutex; |
| 285 | |
| 286 | current_plugin_port = AGS_PLUGIN_PORTcxx . . $ `ags/plugin/ags_plugin_port.h:31:9`!(plugin_port->data); |
| 287 | |
| 288 | /* get plugin port mutex */ |
| 289 | plugin_port_mutex = AGS_PLUGIN_PORT_GET_OBJ_MUTEXcxx . . $ `ags/plugin/ags_plugin_port.h:37:9`!(current_plugin_port); |
| 290 | |
| 291 | /* plugin name, specifier and control port */ |
| 292 | plugin_name = g_strdup_printfcxx . . $ g_strdup_printf(a849077ff1b8d812).("dssi-%u", dssi_plugin->unique_idcxx . . $ _AgsDssiPlugin#unique_id.); |
| 293 | |
| 294 | specifier = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 295 | |
| 296 | port_index = 0; |
| 297 | |
| 298 | g_object_getcxx . . $ g_object_get(1ac911bdc4e9a14d).(current_plugin_port, |
| 299 | "port-name", &specifier, |
| 300 | "port-index", &port_index, |
| 301 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 302 | |
| 303 | control_port = g_strdup_printfcxx . . $ g_strdup_printf(a849077ff1b8d812).("%u/%u", |
| 304 | nth, |
| 305 | control_port_count); |
| 306 | |
| 307 | /* default value */ |
| 308 | g_value_initcxx . . $ g_value_init(afc049a76445919c).(&default_value, |
| 309 | G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!); |
| 310 | |
| 311 | g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(plugin_port_mutex); |
| 312 | |
| 313 | g_value_copycxx . . $ g_value_copy(76788ea28990d685).(current_plugin_port->default_valuecxx . . $ _AgsPluginPort#default_value., |
| 314 | &default_value); |
| 315 | |
| 316 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(plugin_port_mutex); |
| 317 | |
| 318 | /* dssi port */ |
| 319 | dssi_port[nth] = g_object_newcxx . . $ g_object_new(8485fe61b4be4c78).(AGS_TYPE_PORTcxx . . $ `ags/audio/ags_port.h:32:9`!, |
| 320 | "plugin-name", plugin_name, |
| 321 | "specifier", specifier, |
| 322 | "control-port", control_port, |
| 323 | "port-value-is-pointer", FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, |
| 324 | "port-value-type", G_TYPE_FLOATcxx . . $ `<external>/9567554376676449156/gtype.h:153:9`!, |
| 325 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 326 | ags_port_set_flagscxx . . $ ags_port_set_flags(84830934707138c7).(dssi_port[nth], AGS_PORT_USE_LADSPA_FLOATcxx . . $ AGS_PORT_USE_LADSPA_FLOAT.); |
| 327 | |
| 328 | if(ags_plugin_port_test_flagscxx . . $ ags_plugin_port_test_flags(af71b240cf69617a).(current_plugin_port, |
| 329 | AGS_PLUGIN_PORT_OUTPUTcxx . . $ AGS_PLUGIN_PORT_OUTPUT.)){ |
| 330 | ags_port_set_flagscxx . . $ ags_port_set_flags(84830934707138c7).(dssi_port[nth], AGS_PORT_IS_OUTPUTcxx . . $ AGS_PORT_IS_OUTPUT.); |
| 331 | |
| 332 | ags_recall_set_flagscxx . . $ ags_recall_set_flags(ca04eff694fc4130).((AgsRecallcxx . . $ AgsRecall# *) fx_dssi_channel, |
| 333 | AGS_RECALL_HAS_OUTPUT_PORTcxx . . $ AGS_RECALL_HAS_OUTPUT_PORT.); |
| 334 | |
| 335 | }else{ |
| 336 | if(!ags_plugin_port_test_flagscxx . . $ ags_plugin_port_test_flags(af71b240cf69617a).(current_plugin_port, |
| 337 | AGS_PLUGIN_PORT_INTEGERcxx . . $ AGS_PLUGIN_PORT_INTEGER.) && |
| 338 | !ags_plugin_port_test_flagscxx . . $ ags_plugin_port_test_flags(af71b240cf69617a).(current_plugin_port, |
| 339 | AGS_PLUGIN_PORT_TOGGLEDcxx . . $ AGS_PLUGIN_PORT_TOGGLED.)){ |
| 340 | ags_port_set_flagscxx . . $ ags_port_set_flags(84830934707138c7).(dssi_port[nth], AGS_PORT_INFINITE_RANGEcxx . . $ AGS_PORT_INFINITE_RANGE.); |
| 341 | } |
| 342 | } |
| 343 | |
| 344 | g_object_setcxx . . $ g_object_set(1ac911bdc4e9a14d).(dssi_port[nth], |
| 345 | "plugin-port", current_plugin_port, |
| 346 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 347 | |
| 348 | ags_port_util_load_ladspa_conversioncxx . . $ ags_port_util_load_ladspa_conversion(525ddcf43f9eb672).(dssi_port[nth], |
| 349 | current_plugin_port); |
| 350 | |
| 351 | ags_port_safe_write_rawcxx . . $ ags_port_safe_write_raw(3f8c7b03f2be4a83).(dssi_port[nth], |
| 352 | &default_value); |
| 353 | |
| 354 | ags_recall_add_portcxx . . $ ags_recall_add_port(6ead69b5866ab1f9).((AgsRecallcxx . . $ AgsRecall# *) fx_dssi_channel, |
| 355 | dssi_port[nth]); |
| 356 | |
| 357 | /* connect port */ |
| 358 | for(i = 0; i < AGS_SOUND_SCOPE_LASTcxx . . $ AGS_SOUND_SCOPE_LAST.; i++){ |
| 359 | AgsFxDssiAudioScopeDatacxx . . $ AgsFxDssiAudioScopeData# *scope_data; |
| 360 | |
| 361 | scope_data = fx_dssi_audio->scope_datacxx . . $ _AgsFxDssiAudio#scope_data.[i]; |
| 362 | |
| 363 | if(i == AGS_SOUND_SCOPE_PLAYBACKcxx . . $ AGS_SOUND_SCOPE_PLAYBACK. || |
| 364 | i == AGS_SOUND_SCOPE_NOTATIONcxx . . $ AGS_SOUND_SCOPE_NOTATION. || |
| 365 | i == AGS_SOUND_SCOPE_MIDIcxx . . $ AGS_SOUND_SCOPE_MIDI.){ |
| 366 | for(j = 0; j < scope_data->audio_channelscxx . . $ _AgsFxDssiAudioScopeData#audio_channels.; j++){ |
| 367 | AgsFxDssiAudioChannelDatacxx . . $ AgsFxDssiAudioChannelData# *channel_data; |
| 368 | |
| 369 | channel_data = scope_data->channel_datacxx . . $ _AgsFxDssiAudioScopeData#channel_data.[j]; |
| 370 | |
| 371 | if(pad < 128){ |
| 372 | AgsFxDssiAudioInputDatacxx . . $ AgsFxDssiAudioInputData# *input_data; |
| 373 | |
| 374 | input_data = channel_data->input_datacxx . . $ _AgsFxDssiAudioChannelData#input_data.[pad]; |
| 375 | |
| 376 | ags_base_plugin_connect_portcxx . . $ ags_base_plugin_connect_port(972b1340e982144f).((AgsBasePlugincxx . . $ AgsBasePlugin# *) dssi_plugin, |
| 377 | input_data->ladspa_handlecxx . . $ _AgsFxDssiAudioInputData#ladspa_handle., |
| 378 | port_index, |
| 379 | &(dssi_port[nth]->port_valuecxx . . $ _AgsPort#port_value..ags_port_ladspacxx . . $ _AgsPortValue#ags_port_ladspa.)); |
| 380 | } |
| 381 | } |
| 382 | } |
| 383 | } |
| 384 | |
| 385 | g_freecxx . . $ g_free(5d22bdacc48458e8).(plugin_name); |
| 386 | g_freecxx . . $ g_free(5d22bdacc48458e8).(specifier); |
| 387 | g_freecxx . . $ g_free(5d22bdacc48458e8).(control_port); |
| 388 | |
| 389 | g_value_unsetcxx . . $ g_value_unset(15c06aff79890746).(&default_value); |
| 390 | |
| 391 | nth++; |
| 392 | } |
| 393 | |
| 394 | plugin_port = plugin_port->nextcxx . . $ _GList#next.; |
| 395 | } |
| 396 | |
| 397 | dssi_port[nth] = NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!; |
| 398 | } |
| 399 | |
| 400 | /* set DSSI output */ |
| 401 | g_rec_mutex_lockcxx . . $ g_rec_mutex_lock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 402 | |
| 403 | for(i = 0; i < AGS_SOUND_SCOPE_LASTcxx . . $ AGS_SOUND_SCOPE_LAST.; i++){ |
| 404 | AgsFxDssiAudioScopeDatacxx . . $ AgsFxDssiAudioScopeData# *scope_data; |
| 405 | |
| 406 | scope_data = fx_dssi_audio->scope_datacxx . . $ _AgsFxDssiAudio#scope_data.[i]; |
| 407 | |
| 408 | if(i == AGS_SOUND_SCOPE_PLAYBACKcxx . . $ AGS_SOUND_SCOPE_PLAYBACK. || |
| 409 | i == AGS_SOUND_SCOPE_NOTATIONcxx . . $ AGS_SOUND_SCOPE_NOTATION. || |
| 410 | i == AGS_SOUND_SCOPE_MIDIcxx . . $ AGS_SOUND_SCOPE_MIDI.){ |
| 411 | AgsFxDssiAudioChannelDatacxx . . $ AgsFxDssiAudioChannelData# *channel_data; |
| 412 | AgsFxDssiAudioInputDatacxx . . $ AgsFxDssiAudioInputData# *input_data; |
| 413 | |
| 414 | guintcxx . . $ guint# nth; |
| 415 | |
| 416 | channel_data = scope_data->channel_datacxx . . $ _AgsFxDssiAudioScopeData#channel_data.[audio_channel]; |
| 417 | |
| 418 | input_data = channel_data->input_datacxx . . $ _AgsFxDssiAudioChannelData#input_data.[pad]; |
| 419 | |
| 420 | if(input_data->outputcxx . . $ _AgsFxDssiAudioInputData#output. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && |
| 421 | output_port_count > 0 && |
| 422 | buffer_size > 0){ |
| 423 | input_data->outputcxx . . $ _AgsFxDssiAudioInputData#output. = (LADSPA_Datacxx . . $ LADSPA_Data# *) g_malloccxx . . $ g_malloc(bfcfa4d6b7f7ef64).(output_port_count * buffer_size * sizeof(LADSPA_Datacxx . . $ LADSPA_Data#)); |
| 424 | } |
| 425 | |
| 426 | if(input_data->inputcxx . . $ _AgsFxDssiAudioInputData#input. == NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`! && |
| 427 | input_port_count > 0 && |
| 428 | buffer_size > 0){ |
| 429 | input_data->inputcxx . . $ _AgsFxDssiAudioInputData#input. = (LADSPA_Datacxx . . $ LADSPA_Data# *) g_malloccxx . . $ g_malloc(bfcfa4d6b7f7ef64).(input_port_count * buffer_size * sizeof(LADSPA_Datacxx . . $ LADSPA_Data#)); |
| 430 | } |
| 431 | |
| 432 | for(nth = 0; nth < output_port_count; nth++){ |
| 433 | ags_base_plugin_connect_portcxx . . $ ags_base_plugin_connect_port(972b1340e982144f).((AgsBasePlugincxx . . $ AgsBasePlugin# *) dssi_plugin, |
| 434 | input_data->ladspa_handlecxx . . $ _AgsFxDssiAudioInputData#ladspa_handle., |
| 435 | output_port[nth], |
| 436 | &(input_data->outputcxx . . $ _AgsFxDssiAudioInputData#output.[nth])); |
| 437 | } |
| 438 | |
| 439 | for(nth = 0; nth < input_port_count; nth++){ |
| 440 | ags_base_plugin_connect_portcxx . . $ ags_base_plugin_connect_port(972b1340e982144f).((AgsBasePlugincxx . . $ AgsBasePlugin# *) dssi_plugin, |
| 441 | input_data->ladspa_handlecxx . . $ _AgsFxDssiAudioInputData#ladspa_handle., |
| 442 | input_port[nth], |
| 443 | &(input_data->inputcxx . . $ _AgsFxDssiAudioInputData#input.[nth])); |
| 444 | } |
| 445 | |
| 446 | ags_base_plugin_activatecxx . . $ ags_base_plugin_activate(a9e8d68303f3b02).((AgsBasePlugincxx . . $ AgsBasePlugin# *) dssi_plugin, |
| 447 | input_data->ladspa_handlecxx . . $ _AgsFxDssiAudioInputData#ladspa_handle.); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | fx_dssi_channel->dssi_portcxx . . $ _AgsFxDssiChannel#dssi_port. = dssi_port; |
| 452 | |
| 453 | g_rec_mutex_unlockcxx . . $ g_rec_mutex_unlock(70e02e1a6dfc5752).(fx_dssi_channel_mutex); |
| 454 | |
| 455 | /* unref */ |
| 456 | if(fx_dssi_audio != NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!){ |
| 457 | g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).(fx_dssi_audio); |
| 458 | } |
| 459 | |
| 460 | g_list_free_fullcxx . . $ g_list_free_full(5ba5b0738c7ed753).(start_plugin_port, |
| 461 | (GDestroyNotifycxx . . $ GDestroyNotify#) g_object_unrefcxx . . $ g_object_unref(5d22bdacc48458e8).); |
| 462 | } |
| 463 | |
| 464 | /** |
| 465 | * ags_fx_dssi_channel_new: |
| 466 | * @channel: the #AgsChannel |
| 467 | * |
| 468 | * Create a new instance of #AgsFxDssiChannel |
| 469 | * |
| 470 | * Returns: the new #AgsFxDssiChannel |
| 471 | * |
| 472 | * Since: 3.3.0 |
| 473 | */ |
| 474 | AgsFxDssiChannelcxx . . $ AgsFxDssiChannel#* |
| 475 | ags_fx_dssi_channel_newcxx . . $ ags_fx_dssi_channel_new(229d71ad3b907d2).(AgsChannelcxx . . $ AgsChannel# *channel) |
| 476 | { |
| 477 | AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *fx_dssi_channel; |
| 478 | |
| 479 | fx_dssi_channel = (AgsFxDssiChannelcxx . . $ AgsFxDssiChannel# *) g_object_newcxx . . $ g_object_new(8485fe61b4be4c78).(AGS_TYPE_FX_DSSI_CHANNELcxx . . $ `ags/audio/fx/ags_fx_dssi_channel.h:34:9`!, |
| 480 | "source", channel, |
| 481 | NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:419:9`!); |
| 482 | |
| 483 | return(fx_dssi_channel); |
| 484 | } |