summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandreas2026-05-31 13:27:30 +0200
committerandreas2026-05-31 13:34:54 +0200
commitd1c1af1664c330dab04b87fbf06dd0c67de2e846 (patch)
treeb8c935dc38d8e25af1080518ffc10ecb94fcfab2
parent699d70ef7acfc38a49f21bf5793f3f2772d24c22 (diff)
downloadQntan-d1c1af1664c330dab04b87fbf06dd0c67de2e846.tar.gz
Qntan-d1c1af1664c330dab04b87fbf06dd0c67de2e846.zip
Cleanup, INCLUDING BREAKING CHANGES.
-rw-r--r--include/qntan/Qntan.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/include/qntan/Qntan.h b/include/qntan/Qntan.h
index 8ed8788..be08b0f 100644
--- a/include/qntan/Qntan.h
+++ b/include/qntan/Qntan.h
@@ -19,7 +19,7 @@
#endif
-#ifdef Qntan_USERCONFIG
+#if !defined(Qntan_USERCONFIG) || Qntan_USERCONFIG != 0
# include "qntan_userconfig.h"
#endif
@@ -714,17 +714,21 @@ struct Qntan_FileSystem {
#ifndef Qntan_FourierTransform_transform
-# define Qntan_FourierTransform_transform(A, B, C, D) (*A)->transform(A, B, C, D)
+# define Qntan_FourierTransform_transform(A, B, C, D, E, F) (*A)->transform(A, B, C, D, E, F)
#endif
struct Qntan_FourierTransform {
/**/
- int (*transform)( struct Qntan_FourierTransform**, float*samples, size_t samples_cnt, float*output );
+ void (*transform)( struct Qntan_FourierTransform**, float*samples, size_t samples_cnt, float*output,
+ void(*onDone)(int err,float*out,Qntan_Cls), Qntan_Cls );
/* WARN: There may be implementations producing odd results if
* 'samples' and 'output' overlap.
- * @return negative values on erorr. Zero on success.
- *
- * TODO: Make this async.
+ * `samples`: Input data to process.
+ * `output`: An array, at least as large as `samples` where the result
+ * will be written to.
+ * `onDone` called when action is done.
+ * `err` negative values on erorr. Zero on success.
+ * `out` just the same reference given in `output`, for convencience reasons.
*/
};
@@ -1319,7 +1323,7 @@ struct Qntan_CsvEnc {
# define Qntan_JsonEnc_reset(A) (*A)->reset(A)
#endif
#ifndef Qntan_JsonEnc_flush
-# define Qntan_JsonEnc_flush(A) (*A)->flush(A)
+# define Qntan_JsonEnc_flush(A, B, C) (*A)->flush(A, B, C)
#endif
#ifndef Qntan_JsonEnc_objBeg
# define Qntan_JsonEnc_objBeg(A) (*A)->objBeg(A)
@@ -1354,9 +1358,8 @@ struct Qntan_JsonEnc {
void (*reset)( struct Qntan_JsonEnc** );
/* throws away the current state and sets the encoder for a new run.
*/
- void (*flush)( struct Qntan_JsonEnc** );
- /* TODO: to me, looks like this should be async and take an 'onDone' cback.
- */
+ void (*flush)( struct Qntan_JsonEnc**, void(*onDone)(int,Qntan_Cls), Qntan_Cls );
+ /**/
void (*objBeg)( struct Qntan_JsonEnc** );
/**/
void (*objEnd)( struct Qntan_JsonEnc** );