diff options
author | dcherednik <dcherednik@white> | 2018-10-31 01:36:50 +0300 |
---|---|---|
committer | Daniil Cherednik <dan.cherednik@gmail.com> | 2018-11-02 01:54:36 +0300 |
commit | ea08660cc9e28a44a1512a5a56f85e7258d9832d (patch) | |
tree | afce45813f3d0816326a6e12fb2cb996c5bb2d82 /include/libgha.h | |
download | libgha-ea08660cc9e28a44a1512a5a56f85e7258d9832d.tar.gz |
First commit
- Method to get parameters of one harmonic
Diffstat (limited to 'include/libgha.h')
-rw-r--r-- | include/libgha.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/libgha.h b/include/libgha.h new file mode 100644 index 0000000..3c5d123 --- /dev/null +++ b/include/libgha.h @@ -0,0 +1,24 @@ +#ifndef LIBGHA_H +#define LIBGHA_h + +#define FLOAT float + +#include <stddef.h> + +typedef struct gha_ctx gha_ctx; + +struct gha_info { + FLOAT freq; + FLOAT phase; + FLOAT magnitude; +}; + +// size must be even +gha_ctx* gha_create_ctx(size_t size); +void gha_free_ctx(gha_ctx* ctx); + +// This function performs one GHA step for given PCM signal, +// the result will be writen in to given gha_ingo structure +void gha_analyze_one(const FLOAT* pcm, struct gha_info* info, gha_ctx* ctx); + +#endif |