Debian Codegraph @

ags/audio/ags_hq_pitch_util.h

raw symbols SCIP
1 /* GSequencer - Advanced GTK Sequencer
2 * Copyright (C) 2005-2024 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 #ifndef __AGS_HQ_PITCH_UTIL_H__
21 #define __AGS_HQ_PITCH_UTIL_H__cxx . . $ `ags/audio/ags_hq_pitch_util.h:21:9`!
22
23 #include <glib.h>
24 #include <glib-object.h>
25
26 #include <ags/libags.h>cxx . . $ `<file>/ags/libags.h`/
27
28 #include <math.h>
29 #include <complex.h>
30
31 #include <ags/audio/ags_linear_interpolate_util.h>cxx . . $ `<file>/ags/audio/ags_linear_interpolate_util.h`/
32
33 G_BEGIN_DECLScxx . . $ `<external>/12741050725406041920/gmacros.h:947:9`!
34
35 #define AGS_TYPE_HQ_PITCH_UTILcxx . . $ `ags/audio/ags_hq_pitch_util.h:35:9`! (ags_hq_pitch_util_get_type())
36 #define AGS_HQ_PITCH_UTILcxx . . $ `ags/audio/ags_hq_pitch_util.h:36:9`!(ptr) ((AgsHQPitchUtil *)(ptr))
37
38 #define AGS_HQ_PITCH_UTIL_DEFAULT_MAX_BUFFER_SIZEcxx . . $ `ags/audio/ags_hq_pitch_util.h:38:9`! (65536)
39
40 #define AGS_HQ_PITCH_UTIL_INITIALIZERcxx . . $ `ags/audio/ags_hq_pitch_util.h:40:9`! ((AgsHQPitchUtil) { \
41 .source = NULLcxx . . $ `<external>/16391990256953433862/stddef.h:419:9`!, \
42 .source_stride = 1, \
43 .destination = NULLcxx . . $ `<external>/16391990256953433862/stddef.h:419:9`!, \
44 .destination_stride = 1, \
45 .low_mix_buffer = ags_stream_alloc(AGS_HQ_PITCH_UTIL_DEFAULT_MAX_BUFFER_SIZEcxx . . $ `ags/audio/ags_hq_pitch_util.h:38:9`!, AGS_SOUNDCARD_DEFAULT_FORMATcxx . . $ `ags/object/ags_soundcard.h:49:9`!), \
46 .low_mix_buffer_max_buffer_length = AGS_HQ_PITCH_UTIL_DEFAULT_MAX_BUFFER_SIZEcxx . . $ `ags/audio/ags_hq_pitch_util.h:38:9`!, \
47 .new_mix_buffer = ags_stream_alloc(AGS_HQ_PITCH_UTIL_DEFAULT_MAX_BUFFER_SIZEcxx . . $ `ags/audio/ags_hq_pitch_util.h:38:9`!, AGS_SOUNDCARD_DEFAULT_FORMATcxx . . $ `ags/object/ags_soundcard.h:49:9`!), \
48 .new_mix_buffer_max_buffer_length = AGS_HQ_PITCH_UTIL_DEFAULT_MAX_BUFFER_SIZEcxx . . $ `ags/audio/ags_hq_pitch_util.h:38:9`!, \
49 .buffer_length = 0, \
50 .format = AGS_SOUNDCARD_DEFAULT_FORMATcxx . . $ `ags/object/ags_soundcard.h:49:9`!, \
51 .samplerate = AGS_SOUNDCARD_DEFAULT_SAMPLERATEcxx . . $ `ags/object/ags_soundcard.h:45:9`!, \
52 .base_key = 0.0, \
53 .tuning = 0.0, \
54 .linear_interpolate_util = ags_linear_interpolate_util_alloc(), \
55 .vibrato_enabled = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, \
56 .vibrato_gain = 1.0, \
57 .vibrato_lfo_depth = 1.0, \
58 .vibrato_lfo_freq = 8.172, \
59 .vibrato_tuning = 0.0, \
60 .frame_count = (AGS_SOUNDCARD_DEFAULT_SAMPLERATEcxx . . $ `ags/object/ags_soundcard.h:45:9`! / 8.172), \
61 .offset = 0, \
62 .note_256th_mode = FALSEcxx . . $ `<external>/12741050725406041920/gmacros.h:967:9`!, \
63 .offset_256th = 0 })
64
65 typedef struct _AgsHQPitchUtilcxx . . $ _AgsHQPitchUtil# AgsHQPitchUtilcxx . . $ AgsHQPitchUtil#;
66
67 struct _AgsHQPitchUtilcxx . . $ _AgsHQPitchUtil#
68 {
69 gpointercxx . . $ gpointer# sourcecxx . . $ _AgsHQPitchUtil#source.;
70 guintcxx . . $ guint# source_stridecxx . . $ _AgsHQPitchUtil#source_stride.;
71
72 gpointercxx . . $ gpointer# destinationcxx . . $ _AgsHQPitchUtil#destination.;
73 guintcxx . . $ guint# destination_stridecxx . . $ _AgsHQPitchUtil#destination_stride.;
74
75 gpointercxx . . $ gpointer# low_mix_buffercxx . . $ _AgsHQPitchUtil#low_mix_buffer.;
76 guintcxx . . $ guint# low_mix_buffer_max_buffer_lengthcxx . . $ _AgsHQPitchUtil#low_mix_buffer_max_buffer_length.;
77
78 gpointercxx . . $ gpointer# new_mix_buffercxx . . $ _AgsHQPitchUtil#new_mix_buffer.;
79 guintcxx . . $ guint# new_mix_buffer_max_buffer_lengthcxx . . $ _AgsHQPitchUtil#new_mix_buffer_max_buffer_length.;
80
81 guintcxx . . $ guint# buffer_lengthcxx . . $ _AgsHQPitchUtil#buffer_length.;
82 AgsSoundcardFormatcxx . . $ AgsSoundcardFormat# formatcxx . . $ _AgsHQPitchUtil#format.;
83 guintcxx . . $ guint# sampleratecxx . . $ _AgsHQPitchUtil#samplerate.;
84
85 gdoublecxx . . $ gdouble# base_keycxx . . $ _AgsHQPitchUtil#base_key.;
86 gdoublecxx . . $ gdouble# tuningcxx . . $ _AgsHQPitchUtil#tuning.;
87
88 AgsLinearInterpolateUtilcxx . . $ AgsLinearInterpolateUtil# *linear_interpolate_utilcxx . . $ _AgsHQPitchUtil#linear_interpolate_util.;
89
90 gdoublecxx . . $ gdouble# vibrato_enabledcxx . . $ _AgsHQPitchUtil#vibrato_enabled.;
91
92 gdoublecxx . . $ gdouble# vibrato_gaincxx . . $ _AgsHQPitchUtil#vibrato_gain.;
93 gdoublecxx . . $ gdouble# vibrato_lfo_depthcxx . . $ _AgsHQPitchUtil#vibrato_lfo_depth.;
94 gdoublecxx . . $ gdouble# vibrato_lfo_freqcxx . . $ _AgsHQPitchUtil#vibrato_lfo_freq.;
95 gdoublecxx . . $ gdouble# vibrato_tuningcxx . . $ _AgsHQPitchUtil#vibrato_tuning.;
96
97 guintcxx . . $ guint# frame_countcxx . . $ _AgsHQPitchUtil#frame_count.;
98 guintcxx . . $ guint# offsetcxx . . $ _AgsHQPitchUtil#offset.;
99
100 gbooleancxx . . $ gboolean# note_256th_modecxx . . $ _AgsHQPitchUtil#note_256th_mode.;
101
102 guintcxx . . $ guint# offset_256thcxx . . $ _AgsHQPitchUtil#offset_256th.;
103 };
104
105 GTypecxx . . $ GType# ags_hq_pitch_util_get_typecxx . . $ ags_hq_pitch_util_get_type(f708dce9a8856c70).(void);
106
107 AgsHQPitchUtilcxx . . $ AgsHQPitchUtil#* ags_hq_pitch_util_alloccxx . . $ ags_hq_pitch_util_alloc(f39f4f2cb5c14ed7).();
108
109 gpointercxx . . $ gpointer# ags_hq_pitch_util_copycxx . . $ ags_hq_pitch_util_copy(5343d91247258818).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *ptr);
110 void ags_hq_pitch_util_freecxx . . $ ags_hq_pitch_util_free(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *ptr);
111
112 gpointercxx . . $ gpointer# ags_hq_pitch_util_get_sourcecxx . . $ ags_hq_pitch_util_get_source(5343d91247258818).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
113 void ags_hq_pitch_util_set_sourcecxx . . $ ags_hq_pitch_util_set_source(73e853e5c2e066cc).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
114 gpointercxx . . $ gpointer# source);
115
116 guintcxx . . $ guint# ags_hq_pitch_util_get_source_stridecxx . . $ ags_hq_pitch_util_get_source_stride(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
117 void ags_hq_pitch_util_set_source_stridecxx . . $ ags_hq_pitch_util_set_source_stride(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
118 guintcxx . . $ guint# source_stride);
119
120 gpointercxx . . $ gpointer# ags_hq_pitch_util_get_destinationcxx . . $ ags_hq_pitch_util_get_destination(5343d91247258818).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
121 void ags_hq_pitch_util_set_destinationcxx . . $ ags_hq_pitch_util_set_destination(73e853e5c2e066cc).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
122 gpointercxx . . $ gpointer# destination);
123
124 guintcxx . . $ guint# ags_hq_pitch_util_get_destination_stridecxx . . $ ags_hq_pitch_util_get_destination_stride(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
125 void ags_hq_pitch_util_set_destination_stridecxx . . $ ags_hq_pitch_util_set_destination_stride(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
126 guintcxx . . $ guint# destination_stride);
127
128 guintcxx . . $ guint# ags_hq_pitch_util_get_buffer_lengthcxx . . $ ags_hq_pitch_util_get_buffer_length(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
129 void ags_hq_pitch_util_set_buffer_lengthcxx . . $ ags_hq_pitch_util_set_buffer_length(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
130 guintcxx . . $ guint# buffer_length);
131
132 AgsSoundcardFormatcxx . . $ AgsSoundcardFormat# ags_hq_pitch_util_get_formatcxx . . $ ags_hq_pitch_util_get_format(6d2c8c173dcb8e14).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
133 void ags_hq_pitch_util_set_formatcxx . . $ ags_hq_pitch_util_set_format(ea7e6763f8d50b72).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
134 AgsSoundcardFormatcxx . . $ AgsSoundcardFormat# format);
135
136 guintcxx . . $ guint# ags_hq_pitch_util_get_sampleratecxx . . $ ags_hq_pitch_util_get_samplerate(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
137 void ags_hq_pitch_util_set_sampleratecxx . . $ ags_hq_pitch_util_set_samplerate(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
138 guintcxx . . $ guint# samplerate);
139
140 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_base_keycxx . . $ ags_hq_pitch_util_get_base_key(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
141 void ags_hq_pitch_util_set_base_keycxx . . $ ags_hq_pitch_util_set_base_key(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
142 gdoublecxx . . $ gdouble# base_key);
143
144 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_tuningcxx . . $ ags_hq_pitch_util_get_tuning(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
145 void ags_hq_pitch_util_set_tuningcxx . . $ ags_hq_pitch_util_set_tuning(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
146 gdoublecxx . . $ gdouble# tuning);
147
148 gbooleancxx . . $ gboolean# ags_hq_pitch_util_get_vibrato_enabledcxx . . $ ags_hq_pitch_util_get_vibrato_enabled(51aabb00fcbb875c).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
149 void ags_hq_pitch_util_set_vibrato_enabledcxx . . $ ags_hq_pitch_util_set_vibrato_enabled(d41f8eb326ca93dd).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
150 gbooleancxx . . $ gboolean# vibrato_enabled);
151
152 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_vibrato_gaincxx . . $ ags_hq_pitch_util_get_vibrato_gain(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
153 void ags_hq_pitch_util_set_vibrato_gaincxx . . $ ags_hq_pitch_util_set_vibrato_gain(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
154 gdoublecxx . . $ gdouble# vibrato_gain);
155
156 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_vibrato_lfo_depthcxx . . $ ags_hq_pitch_util_get_vibrato_lfo_depth(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
157 void ags_hq_pitch_util_set_vibrato_lfo_depthcxx . . $ ags_hq_pitch_util_set_vibrato_lfo_depth(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
158 gdoublecxx . . $ gdouble# vibrato_lfo_depth);
159
160 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_vibrato_lfo_freqcxx . . $ ags_hq_pitch_util_get_vibrato_lfo_freq(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
161 void ags_hq_pitch_util_set_vibrato_lfo_freqcxx . . $ ags_hq_pitch_util_set_vibrato_lfo_freq(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
162 gdoublecxx . . $ gdouble# vibrato_lfo_freq);
163
164 gdoublecxx . . $ gdouble# ags_hq_pitch_util_get_vibrato_tuningcxx . . $ ags_hq_pitch_util_get_vibrato_tuning(1e54a6d43c847423).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
165 void ags_hq_pitch_util_set_vibrato_tuningcxx . . $ ags_hq_pitch_util_set_vibrato_tuning(9dd4d090d5f448d3).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
166 gdoublecxx . . $ gdouble# vibrato_tuning);
167
168 guintcxx . . $ guint# ags_hq_pitch_util_get_frame_countcxx . . $ ags_hq_pitch_util_get_frame_count(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
169 void ags_hq_pitch_util_set_frame_countcxx . . $ ags_hq_pitch_util_set_frame_count(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
170 guintcxx . . $ guint# frame_count);
171
172 guintcxx . . $ guint# ags_hq_pitch_util_get_offsetcxx . . $ ags_hq_pitch_util_get_offset(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
173 void ags_hq_pitch_util_set_offsetcxx . . $ ags_hq_pitch_util_set_offset(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
174 guintcxx . . $ guint# offset);
175
176 gbooleancxx . . $ gboolean# ags_hq_pitch_util_get_note_256th_modecxx . . $ ags_hq_pitch_util_get_note_256th_mode(51aabb00fcbb875c).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
177 void ags_hq_pitch_util_set_note_256th_modecxx . . $ ags_hq_pitch_util_set_note_256th_mode(d41f8eb326ca93dd).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
178 gbooleancxx . . $ gboolean# note_256th_mode);
179
180 guintcxx . . $ guint# ags_hq_pitch_util_get_offset_256thcxx . . $ ags_hq_pitch_util_get_offset_256th(70016a7e8e2e4fa0).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
181 void ags_hq_pitch_util_set_offset_256thcxx . . $ ags_hq_pitch_util_set_offset_256th(947e5f4f7f65319f).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util,
182 guintcxx . . $ guint# offset_256th);
183
184 void ags_hq_pitch_util_pitch_s8cxx . . $ ags_hq_pitch_util_pitch_s8(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
185 void ags_hq_pitch_util_pitch_s16cxx . . $ ags_hq_pitch_util_pitch_s16(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
186 void ags_hq_pitch_util_pitch_s24cxx . . $ ags_hq_pitch_util_pitch_s24(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
187 void ags_hq_pitch_util_pitch_s32cxx . . $ ags_hq_pitch_util_pitch_s32(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
188 void ags_hq_pitch_util_pitch_s64cxx . . $ ags_hq_pitch_util_pitch_s64(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
189 void ags_hq_pitch_util_pitch_floatcxx . . $ ags_hq_pitch_util_pitch_float(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
190 void ags_hq_pitch_util_pitch_doublecxx . . $ ags_hq_pitch_util_pitch_double(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
191 void ags_hq_pitch_util_pitch_complexcxx . . $ ags_hq_pitch_util_pitch_complex(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
192
193 void ags_hq_pitch_util_pitchcxx . . $ ags_hq_pitch_util_pitch(baecc37038ba2a22).(AgsHQPitchUtilcxx . . $ AgsHQPitchUtil# *hq_pitch_util);
194
195 G_END_DECLScxx . . $ `<external>/12741050725406041920/gmacros.h:948:9`!
196
197 #endif /*__AGS_HQ_PITCH_UTIL_H__*/