From 31b1475995872a5113d991d8368a0e76e5b691b6 Mon Sep 17 00:00:00 2001 From: Mark Hills Date: Tue, 21 May 2013 21:29:50 +0100 Subject: [PATCH] Provide a value for the zero-data case Really this just suppresses the compiler warning that 'trough' is not used. --- bpm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/bpm.c b/bpm.c index f022ac2..ca026d6 100644 --- a/bpm.c +++ b/bpm.c @@ -141,6 +141,7 @@ double scan_for_bpm(float nrg[], size_t len, step = (slowest - fastest) / steps; height = INFINITY; + trough = NAN; for (interval = fastest; interval <= slowest; interval += step) { double t;