|
2 | 2 |
|
3 | 3 | #ifdef _WIN32
|
4 | 4 | #define SHARED_EXPORT __declspec(dllexport)
|
| 5 | +#define CALLING_CONVENTION __cdecl |
5 | 6 | #else
|
6 |
| -#define SHARED_EXPORT |
| 7 | +#define SHARED_EXPORT __attribute__((visibility("default"))) |
| 8 | +#define CALLING_CONVENTION |
7 | 9 | #endif
|
8 | 10 |
|
9 | 11 | #include "brainflow_constants.h"
|
@@ -33,40 +35,40 @@ extern "C"
|
33 | 35 | #endif
|
34 | 36 | // signal processing methods
|
35 | 37 | // ripple param is used only for chebyshev filter
|
36 |
| - SHARED_EXPORT int perform_lowpass (double *data, int data_len, int sampling_rate, double cutoff, |
| 38 | + SHARED_EXPORT int CALLING_CONVENTION perform_lowpass (double *data, int data_len, int sampling_rate, double cutoff, |
37 | 39 | int order, int filter_type, double ripple);
|
38 |
| - SHARED_EXPORT int perform_highpass (double *data, int data_len, int sampling_rate, |
| 40 | + SHARED_EXPORT int CALLING_CONVENTION perform_highpass (double *data, int data_len, int sampling_rate, |
39 | 41 | double cutoff, int order, int filter_type, double ripple);
|
40 |
| - SHARED_EXPORT int perform_bandpass (double *data, int data_len, int sampling_rate, |
| 42 | + SHARED_EXPORT int CALLING_CONVENTION perform_bandpass (double *data, int data_len, int sampling_rate, |
41 | 43 | double center_freq, double band_width, int order, int filter_type, double ripple);
|
42 |
| - SHARED_EXPORT int perform_bandstop (double *data, int data_len, int sampling_rate, |
| 44 | + SHARED_EXPORT int CALLING_CONVENTION perform_bandstop (double *data, int data_len, int sampling_rate, |
43 | 45 | double center_freq, double band_width, int order, int filter_type, double ripple);
|
44 | 46 |
|
45 |
| - SHARED_EXPORT int perform_rolling_filter ( |
| 47 | + SHARED_EXPORT int CALLING_CONVENTION perform_rolling_filter ( |
46 | 48 | double *data, int data_len, int period, int agg_operation);
|
47 | 49 |
|
48 |
| - SHARED_EXPORT int perform_downsampling ( |
| 50 | + SHARED_EXPORT int CALLING_CONVENTION perform_downsampling ( |
49 | 51 | double *data, int data_len, int period, int agg_operation, double *output_data);
|
50 | 52 |
|
51 |
| - SHARED_EXPORT int perform_wavelet_transform (double *data, int data_len, char *wavelet, |
| 53 | + SHARED_EXPORT int CALLING_CONVENTION perform_wavelet_transform (double *data, int data_len, char *wavelet, |
52 | 54 | int decomposition_level, double *output_data, int *decomposition_lengths);
|
53 |
| - SHARED_EXPORT int perform_inverse_wavelet_transform (double *wavelet_coeffs, |
| 55 | + SHARED_EXPORT int CALLING_CONVENTION perform_inverse_wavelet_transform (double *wavelet_coeffs, |
54 | 56 | int original_data_len, char *wavelet, int decomposition_level, int *decomposition_lengths,
|
55 | 57 | double *output_data);
|
56 |
| - SHARED_EXPORT int perform_wavelet_denoising ( |
| 58 | + SHARED_EXPORT int CALLING_CONVENTION perform_wavelet_denoising ( |
57 | 59 | double *data, int data_len, char *wavelet, int decomposition_level);
|
58 |
| - SHARED_EXPORT int perform_fft ( |
| 60 | + SHARED_EXPORT int CALLING_CONVENTION perform_fft ( |
59 | 61 | double *data, int data_len, double *output_re, double *output_im);
|
60 |
| - SHARED_EXPORT int perform_ifft ( |
| 62 | + SHARED_EXPORT int CALLING_CONVENTION perform_ifft ( |
61 | 63 | double *input_re, double *input_im, int data_len, double *restored_data);
|
62 | 64 |
|
63 | 65 |
|
64 | 66 | // file operations
|
65 |
| - SHARED_EXPORT int write_file ( |
| 67 | + SHARED_EXPORT int CALLING_CONVENTION write_file ( |
66 | 68 | double *data, int num_rows, int num_cols, char *file_name, char *file_mode);
|
67 |
| - SHARED_EXPORT int read_file ( |
| 69 | + SHARED_EXPORT int CALLING_CONVENTION read_file ( |
68 | 70 | double *data, int *num_rows, int *num_cols, char *file_name, int num_elements);
|
69 |
| - SHARED_EXPORT int get_num_elements_in_file ( |
| 71 | + SHARED_EXPORT int CALLING_CONVENTION get_num_elements_in_file ( |
70 | 72 | char *file_name, int *num_elements); // its an internal method for bindings its not
|
71 | 73 | // available via high level api
|
72 | 74 | #ifdef __cplusplus
|
|
0 commit comments