Gjsify LogoGjsify Logo

#GstFFTS32 provides a FFT implementation and related functions for signed 32 bit integer samples. To use this call gst_fft_s32_new() for allocating a #GstFFTS32 instance with the appropriate parameters and then call gst_fft_s32_fft() or gst_fft_s32_inverse_fft() to perform the FFT or inverse FFT on a buffer of samples.

After use free the #GstFFTS32 instance with gst_fft_s32_free().

For the best performance use gst_fft_next_fast_length() to get a number that is entirely a product of 2, 3 and 5 and use this as the len parameter for gst_fft_s32_new().

The len parameter specifies the number of samples in the time domain that will be processed or generated. The number of samples in the frequency domain is len/2 + 1. To get n samples in the frequency domain use 2*n - 2 as len.

Before performing the FFT on time domain data it usually makes sense to apply a window function to it. For this gst_fft_s32_window() can comfortably be used.

Be aware, that you can't simply run gst_fft_s32_inverse_fft() on the resulting frequency data of gst_fft_s32_fft() to get the original data back. The relation between them is iFFT (FFT (x)) = x / nfft where nfft is the length of the FFT. This also has to be taken into account when calculation the magnitude of the frequency data.

record

Hierarchy

  • FFTS32

Index

Constructors

Properties

Methods

Constructors

Properties

name: string

Methods

  • This performs the FFT on timedata and puts the result in freqdata.

    timedata must have as many samples as specified with the len parameter while allocating the #GstFFTS32 instance with gst_fft_s32_new().

    freqdata must be large enough to hold len/2 + 1 #GstFFTS32Complex frequency domain samples.

    Parameters

    • timedata: number

      Buffer of the samples in the time domain

    • freqdata: FFTS32Complex

      Target buffer for the samples in the frequency domain

    Returns void

  • free(): void
  • This performs the inverse FFT on freqdata and puts the result in timedata.

    freqdata must have len/2 + 1 samples, where len is the parameter specified while allocating the #GstFFTS32 instance with gst_fft_s32_new().

    timedata must be large enough to hold len time domain samples.

    Parameters

    • freqdata: FFTS32Complex

      Buffer of the samples in the frequency domain

    • timedata: number

      Target buffer for the samples in the time domain

    Returns void

  • window(timedata: number, window: FFTWindow): void
  • This calls the window function window on the timedata sample buffer.

    Parameters

    • timedata: number

      Time domain samples

    • window: FFTWindow

      Window function to apply

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method