FFT: Take float[] instead of float

This commit is contained in:
Stephan Sundermann 2013-11-03 18:00:45 +01:00
parent d4eb0aced7
commit b0a05d7ed4
2 changed files with 16 additions and 0 deletions

View file

@ -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);
}
}
}

View file

@ -65,6 +65,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<attr path="/api/namespace/struct[@cname='GstRTPBuffer']/method[@cname='gst_rtp_buffer_get_extension_twobytes_header']" name="hidden">true</attr>
<attr path="/api/namespace/struct[@cname='GstRTSPMessage']/method[@cname='gst_rtsp_message_get_body']" name="hidden">true</attr>
<attr path="/api/namespace/struct[@cname='GstRTSPMessage']/method[@cname='gst_rtsp_message_steal_body']" name="hidden">true</attr>
<attr path="/api/namespace/struct[@cname='GstFFTF32']/method[@cname='gst_fft_f32_fft']" name="hidden">true</attr>
<attr path="/api/namespace/struct[@cname='GstFFTF32']/method[@cname='gst_fft_f32_window']" name="hidden">true</attr>
<!-- Maybe some problems with the name -->
<remove-node path="/api/namespace/interface[@cname='GstURIHandler']/class_struct/method[@vm='get_type']" name="vm" />
<remove-node path="/api/namespace/interface[@cname='GstURIHandler']/virtual_method[@cname='get_type']" name="hidden" />