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_recycling.h>
21 
22 #include <ags/audio/fx/ags_fx_dssi_audio_signal.h>
23 
24 #include <ags/i18n.h>
25 
26 void ags_fx_dssi_recycling_class_init(AgsFxDssiRecyclingClass *fx_dssi_recycling);
27 void ags_fx_dssi_recycling_init(AgsFxDssiRecycling *fx_dssi_recycling);
28 void ags_fx_dssi_recycling_dispose(GObject *gobject);
29 void ags_fx_dssi_recycling_finalize(GObject *gobject);
30 
31 /**
32  * SECTION:ags_fx_dssi_recycling
33  * @short_description: fx dssi recycling
34  * @title: AgsFxDssiRecycling
35  * @section_id:
36  * @include: ags/audio/fx/ags_fx_dssi_recycling.h
37  *
38  * The #AgsFxDssiRecycling class provides ports to the effect processor.
39  */
40 
41 static gpointer ags_fx_dssi_recycling_parent_class = NULL;
42 
43 const gchar *ags_fx_dssi_recycling_plugin_name = "ags-fx-dssi";
44 
45 GType
ags_fx_dssi_recycling_get_type()46 ags_fx_dssi_recycling_get_type()
47 {
48   static volatile gsize g_define_type_id__volatile = 0;
49 
50   if(g_once_init_enter (&g_define_type_id__volatile)){
51     GType ags_type_fx_dssi_recycling = 0;
52 
53     static const GTypeInfo ags_fx_dssi_recycling_info = {
54       sizeof (AgsFxDssiRecyclingClass),
55       NULL, /* base_init */
56       NULL, /* base_finalize */
57       (GClassInitFunc) ags_fx_dssi_recycling_class_init,
58       NULL, /* class_finalize */
59       NULL, /* class_recycling */
60       sizeof (AgsFxDssiRecycling),
61       0,    /* n_preallocs */
62       (GInstanceInitFunc) ags_fx_dssi_recycling_init,
63     };
64 
65     ags_type_fx_dssi_recycling = g_type_register_static(AGS_TYPE_FX_NOTATION_RECYCLING,
66 							"AgsFxDssiRecycling",
67 							&ags_fx_dssi_recycling_info,
68 							0);
69 
70     g_once_init_leave(&g_define_type_id__volatile, ags_type_fx_dssi_recycling);
71   }
72 
73   return g_define_type_id__volatile;
74 }
75 
76 void
ags_fx_dssi_recycling_class_init(AgsFxDssiRecyclingClass * fx_dssi_recycling)77 ags_fx_dssi_recycling_class_init(AgsFxDssiRecyclingClass *fx_dssi_recycling)
78 {
79   GObjectClass *gobject;
80 
81   ags_fx_dssi_recycling_parent_class = g_type_class_peek_parent(fx_dssi_recycling);
82 
83   /* GObjectClass */
84   gobject = (GObjectClass *) fx_dssi_recycling;
85 
86   gobject->dispose = ags_fx_dssi_recycling_dispose;
87   gobject->finalize = ags_fx_dssi_recycling_finalize;
88 }
89 
90 void
ags_fx_dssi_recycling_init(AgsFxDssiRecycling * fx_dssi_recycling)91 ags_fx_dssi_recycling_init(AgsFxDssiRecycling *fx_dssi_recycling)
92 {
93   AGS_RECALL(fx_dssi_recycling)->name = "ags-fx-dssi";
94   AGS_RECALL(fx_dssi_recycling)->version = AGS_RECALL_DEFAULT_VERSION;
95   AGS_RECALL(fx_dssi_recycling)->build_id = AGS_RECALL_DEFAULT_BUILD_ID;
96   AGS_RECALL(fx_dssi_recycling)->xml_type = "ags-fx-dssi-recycling";
97 
98   AGS_RECALL(fx_dssi_recycling)->child_type = AGS_TYPE_FX_DSSI_AUDIO_SIGNAL;
99 }
100 
101 void
ags_fx_dssi_recycling_dispose(GObject * gobject)102 ags_fx_dssi_recycling_dispose(GObject *gobject)
103 {
104   AgsFxDssiRecycling *fx_dssi_recycling;
105 
106   fx_dssi_recycling = AGS_FX_DSSI_RECYCLING(gobject);
107 
108   /* call parent */
109   G_OBJECT_CLASS(ags_fx_dssi_recycling_parent_class)->dispose(gobject);
110 }
111 
112 void
ags_fx_dssi_recycling_finalize(GObject * gobject)113 ags_fx_dssi_recycling_finalize(GObject *gobject)
114 {
115   AgsFxDssiRecycling *fx_dssi_recycling;
116 
117   fx_dssi_recycling = AGS_FX_DSSI_RECYCLING(gobject);
118 
119   /* call parent */
120   G_OBJECT_CLASS(ags_fx_dssi_recycling_parent_class)->finalize(gobject);
121 }
122 
123 /**
124  * ags_fx_dssi_recycling_new:
125  * @recycling: the #AgsRecycling
126  *
127  * Create a new instance of #AgsFxDssiRecycling
128  *
129  * Returns: the new #AgsFxDssiRecycling
130  *
131  * Since: 3.3.0
132  */
133 AgsFxDssiRecycling*
ags_fx_dssi_recycling_new(AgsRecycling * recycling)134 ags_fx_dssi_recycling_new(AgsRecycling *recycling)
135 {
136   AgsFxDssiRecycling *fx_dssi_recycling;
137 
138   fx_dssi_recycling = (AgsFxDssiRecycling *) g_object_new(AGS_TYPE_FX_DSSI_RECYCLING,
139 							  "source", recycling,
140 							  NULL);
141 
142   return(fx_dssi_recycling);
143 }
144