libvisual  0.5.0
lv_fourier_c.cpp
1 #include "config.h"
2 #include "lv_fourier.h"
3 #include "lv_common.h"
4 
5 extern "C" {
6 
7  VisDFT *visual_dft_new (unsigned int samples_out, unsigned int samples_in)
8  {
9  return new LV::DFT (samples_out, samples_in);
10  }
11 
12  void visual_dft_free (VisDFT *dft)
13  {
14  delete dft;
15  }
16 
17  void visual_dft_perform (VisDFT *self, float *output, float const *input)
18  {
19  visual_return_if_fail (self != nullptr);
20 
21  self->perform (output, input);
22  }
23 
24  void visual_dft_log_scale (float *output, float const *input, unsigned int size)
25  {
26  LV::DFT::log_scale (output, input, size);
27  }
28 
29  void visual_dft_log_scale_standard (float *output, float const *input, unsigned int size)
30  {
31  LV::DFT::log_scale (output, input, size);
32  }
33 
34  void visual_dft_log_scale_custom (float *output, float const *input, unsigned int size, float log_scale_divisor)
35  {
36  LV::DFT::log_scale_custom (output, input, size, log_scale_divisor);
37  }
38 
39 } // C extern
40