aboutsummaryrefslogtreecommitdiffstats
path: root/lib/include
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2023-12-12 23:17:35 +0100
committerDaniil Cherednik <dan.cherednik@gmail.com>2023-12-12 23:17:35 +0100
commit0f08bc5487adffde5f3e0aff30ffe41b53a21bf1 (patch)
treedce92f6daa256f17d8e292e1578605af2f2218f9 /lib/include
parent93a9691246574b6d51ddbbdb5be3dceb89ff24e9 (diff)
downloadlibfshift-0f08bc5487adffde5f3e0aff30ffe41b53a21bf1.tar.gz
Draft implementation:HEADmain
- f must be divisors of 44100 and be positive - 44100 hardcoded
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/libfshift.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/include/libfshift.h b/lib/include/libfshift.h
new file mode 100644
index 0000000..61dd712
--- /dev/null
+++ b/lib/include/libfshift.h
@@ -0,0 +1,35 @@
+#ifndef LIBFSHIFT_H
+#define LIBFSHIFT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+
+typedef struct fshift_ctx *fshift_ctx_t;
+
+/*
+ * Create processing context.
+ */
+fshift_ctx_t fshift_create_ctx(float fshift, uint8_t sz);
+
+/*
+ * Free processing context
+ */
+void fshift_free_ctx(fshift_ctx_t ctx);
+
+/*
+ * Perform processing step
+ * in - pointer to the buffer to read input block
+ * out1 - pointer to buffer to save result of processing previous chunk
+ * out2 - pointer to buffer to save delayed and filtering signal without
+ * frequency shift processing.
+ */
+void fshift_run(fshift_ctx_t ctx, const float* in, float* out1, float* out2);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif