feat(cycles): add AMFM - Ehlers AM Detector / FM Demodulator

This commit is contained in:
Miha Kralj
2026-03-17 15:56:55 -07:00
parent e17b00172a
commit d3cb9d2513
14 changed files with 1240 additions and 0 deletions
+11
View File
@@ -1525,6 +1525,17 @@ public static unsafe partial class Exports
catch { return StatusCodes.QTL_ERR_INTERNAL; }
}
// Amfm: Pattern OC-dual (open, close → fmOut, amOut, int period)
[UnmanagedCallersOnly(EntryPoint = "qtl_amfm")]
public static int QtlAmfm(double* open, double* close, int n, double* dstFm, double* dstAm, int period)
{
if (open == null || close == null || dstFm == null || dstAm == null) return StatusCodes.QTL_ERR_NULL_PTR;
if (n <= 0) return StatusCodes.QTL_ERR_INVALID_LENGTH;
int v = ChkPeriod(period); if (v != 0) return v;
try { Amfm.Batch(Src(open, n), Src(close, n), Dst(dstAm, n), Dst(dstFm, n), period); return StatusCodes.QTL_OK; }
catch { return StatusCodes.QTL_ERR_INTERNAL; }
}
// ═══════════════════════════════════════════════════════════════════════
// §8.14 Numerics / transforms
// ═══════════════════════════════════════════════════════════════════════