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 #ifndef __AGS_PHASE_SHIFT_UTIL_H__
21 #define __AGS_PHASE_SHIFT_UTIL_H__
22 
23 #include <glib.h>
24 #include <glib-object.h>
25 
26 #include <ags/libags.h>
27 
28 #include <math.h>
29 #include <complex.h>
30 
31 G_BEGIN_DECLS
32 
33 #define AGS_TYPE_PHASE_SHIFT_UTIL         (ags_phase_shift_util_get_type())
34 
35 typedef struct _AgsPhaseShiftUtil AgsPhaseShiftUtil;
36 
37 struct _AgsPhaseShiftUtil
38 {
39   //empty
40 };
41 
42 GType ags_phase_shift_util_get_type(void);
43 
44 void ags_phase_shift_util_compute_s8(gint8 *destination,
45 				     gint8 *source,
46 				     guint buffer_length,
47 				     guint samplerate,
48 				     gdouble frequency,
49 				     gdouble amount,
50 				     gdouble phase);
51 void ags_phase_shift_util_compute_s16(gint16 *destination,
52 				      gint16 *source,
53 				      guint buffer_length,
54 				      guint samplerate,
55 				      gdouble frequency,
56 				      gdouble amount,
57 				      gdouble phase);
58 void ags_phase_shift_util_compute_s24(gint32 *destination,
59 				      gint32 *source,
60 				      guint buffer_length,
61 				      guint samplerate,
62 				      gdouble frequency,
63 				      gdouble amount,
64 				      gdouble phase);
65 void ags_phase_shift_util_compute_s32(gint32 *destination,
66 				      gint32 *source,
67 				      guint buffer_length,
68 				      guint samplerate,
69 				      gdouble frequency,
70 				      gdouble amount,
71 				      gdouble phase);
72 void ags_phase_shift_util_compute_s64(gint64 *destination,
73 				      gint64 *source,
74 				      guint buffer_length,
75 				      guint samplerate,
76 				      gdouble frequency,
77 				      gdouble amount,
78 				      gdouble phase);
79 void ags_phase_shift_util_compute_float(gfloat *destination,
80 					gfloat *source,
81 					guint buffer_length,
82 					guint samplerate,
83 					gdouble frequency,
84 					gdouble amount,
85 					gdouble phase);
86 void ags_phase_shift_util_compute_double(gdouble *destination,
87 					 gdouble *source,
88 					 guint buffer_length,
89 					 guint samplerate,
90 					 gdouble frequency,
91 					 gdouble amount,
92 					 gdouble phase);
93 void ags_phase_shift_util_compute_complex(AgsComplex *destination,
94 					  AgsComplex *source,
95 					  guint buffer_length,
96 					  guint samplerate,
97 					  gdouble frequency,
98 					  gdouble amount,
99 					  gdouble phase);
100 
101 G_END_DECLS
102 
103 #endif /*__AGS_PHASE_SHIFT_UTIL_H__*/
104