summaryrefslogtreecommitdiff
path: root/sources/custom
diff options
context:
space:
mode:
authorStephan Sundermann <stephansundermann@gmail.com>2013-11-03 18:00:45 +0100
committerStephan Sundermann <stephansundermann@gmail.com>2013-12-21 16:52:28 +0100
commitb0a05d7ed4eb88b474a224c0f59eb092b31c1339 (patch)
treee346b5e93d4f2c2a1893a86456a8a72224e396e2 /sources/custom
parentd4eb0aced7526fc135ae640941eb601c7bf8fc85 (diff)
FFT: Take float[] instead of float
Diffstat (limited to 'sources/custom')
-rw-r--r--sources/custom/FFTF32.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/sources/custom/FFTF32.cs b/sources/custom/FFTF32.cs
index ccd3e08..57292ba 100644
--- a/sources/custom/FFTF32.cs
+++ b/sources/custom/FFTF32.cs
@@ -28,5 +28,19 @@ namespace Gst.FFT {
public FFTF32 (int len, bool inverse) {
Raw = gst_fft_f32_new (len, inverse);
}
+
+ [DllImport("libgstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern void gst_fft_f32_fft(IntPtr raw, float[] timedata, [MarshalAs (UnmanagedType.LPArray, ArraySubType=UnmanagedType.Struct)] FFTF32Complex[] freqdata);
+
+ public void Fft(float[] timedata, Gst.FFT.FFTF32Complex[] freqdata) {
+ gst_fft_f32_fft(Handle, timedata, freqdata);
+ }
+
+ [DllImport("libgstfft-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)]
+ static extern void gst_fft_f32_window(IntPtr raw, float[] timedata, int window);
+
+ public void Window(float[] timedata, Gst.FFT.FFTWindow window) {
+ gst_fft_f32_window(Handle, timedata, (int) window);
+ }
}
}