aboutsummaryrefslogtreecommitdiffstats
path: root/src/gha.c
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2018-11-04 01:19:48 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2018-11-04 01:19:48 +0300
commit5b176978c464b4d60ccd8b4d576eb31e3039f9a8 (patch)
tree17ed62357e735ff46e477b816537daef962e5b7c /src/gha.c
parentd8502a297b556cb06bf59bd00b2524931a8f034a (diff)
downloadlibgha-5b176978c464b4d60ccd8b4d576eb31e3039f9a8.tar.gz
Simple method to extract K sinusoids for one call
Diffstat (limited to 'src/gha.c')
-rw-r--r--src/gha.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gha.c b/src/gha.c
index 39812ea..7e4fd16 100644
--- a/src/gha.c
+++ b/src/gha.c
@@ -213,3 +213,11 @@ void gha_extract_one(FLOAT* pcm, struct gha_info* info, gha_ctx_t ctx)
for (i = 0; i < ctx->size; i++)
pcm[i] -= ctx->tmp_buf[i] * magnitude;
}
+
+void gha_extract_many_simple(FLOAT* pcm, struct gha_info* info, size_t k, gha_ctx_t ctx)
+{
+ int i;
+ for (i = 0; i < k; i++) {
+ gha_extract_one(pcm, info + i, ctx);
+ }
+}