#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <string.h>
#include "dt_window.h"
Go to the source code of this file.
Data Structures | |
struct | ts_window_function |
struct | x_dt_window |
Defines | |
#define | NUMBER_OF_WINDOW_FUNCTIONS (sizeof(discrete_time_window_function_table) / sizeof(discrete_time_window_function_table[0])) |
Functions | |
static double | hamming_eq (int32_t num, int32_t den) |
static double | hanning_eq (int32_t num, int32_t den) |
static double | blackman_eq (int32_t num, int32_t den) |
static double * | dt_window_compute (te_dt_window_type type, uint32_t size) |
dt_window | dt_window_create (te_dt_window_type type, uint32_t size) |
Pointer to an discrete time window object. | |
void | dt_window_apply (dt_window w, double *data) |
Applies a discrete time window to real waveform data. | |
void | dt_window_destroy (dt_window *w) |
De-allocates the discrete time window object. | |
Variables | |
static const ts_window_function | discrete_time_window_function_table [DT_NUMBER_OF_WINDOWS] |
#define NUMBER_OF_WINDOW_FUNCTIONS (sizeof(discrete_time_window_function_table) / sizeof(discrete_time_window_function_table[0])) |
static double blackman_eq | ( | int32_t | num, | |
int32_t | den | |||
) | [static] |
Definition at line 146 of file dt_window.c.
void dt_window_apply | ( | dt_window | w, | |
double * | data | |||
) |
Applies a discrete time window to real waveform data.
w | pointer to discrete time window object. | |
data | pointer to real array to apply discrete time window funtion to. |
Definition at line 95 of file dt_window.c.
References x_dt_window::elements, and x_dt_window::size.
Referenced by fwin_apply_window(), fwin_reapply_window(), and morse_create_fft_amp_array().
static double * dt_window_compute | ( | te_dt_window_type | type, | |
uint32_t | size | |||
) | [static] |
Definition at line 117 of file dt_window.c.
References ts_window_function::function.
Referenced by dt_window_create().
dt_window dt_window_create | ( | te_dt_window_type | type, | |
uint32_t | size | |||
) |
Pointer to an discrete time window object.
Used to limit FFT leakage.
type | window function (hamming, hanning). | |
size | the size of the window function, same as the audio packet data size. |
Definition at line 75 of file dt_window.c.
References dt_window_compute(), x_dt_window::elements, NUMBER_OF_WINDOW_FUNCTIONS, x_dt_window::size, and x_dt_window::window_function.
Referenced by fwin_apply_window(), and morse_start_threads().
void dt_window_destroy | ( | dt_window * | w | ) |
De-allocates the discrete time window object.
Definition at line 108 of file dt_window.c.
Referenced by free_all().
static double hamming_eq | ( | int32_t | num, | |
int32_t | den | |||
) | [static] |
Definition at line 136 of file dt_window.c.
static double hanning_eq | ( | int32_t | num, | |
int32_t | den | |||
) | [static] |
Definition at line 141 of file dt_window.c.
const ts_window_function discrete_time_window_function_table[DT_NUMBER_OF_WINDOWS] [static] |
Initial value:
{ {"Hamming", &hamming_eq}, {"Hanning", &hanning_eq}, {"Blackman", &blackman_eq} }
Definition at line 65 of file dt_window.c.