From 969da36a128a35b745ef3666c870918a14338a63 Mon Sep 17 00:00:00 2001 From: Ahmet Inan Date: Fri, 28 Nov 2014 16:30:44 +0100 Subject: [PATCH] moved global static inside method --- app/src/main/rs/decoder.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/main/rs/decoder.rs b/app/src/main/rs/decoder.rs index 5f74076..54c13a3 100644 --- a/app/src/main/rs/decoder.rs +++ b/app/src/main/rs/decoder.rs @@ -107,20 +107,20 @@ static float2 dat_ddc(float amp) } static float cnt_fmd_scale; -static float2 cnt_fmd_prev; static float cnt_fmd(float2 baseband) { - float phase = carg(cdiv(baseband, cnt_fmd_prev)); - cnt_fmd_prev = baseband; + static float2 prev; + float phase = carg(cdiv(baseband, prev)); + prev = baseband; return clamp(cnt_fmd_scale * phase, -1.0f, 1.0f); } static float dat_fmd_scale; -static float2 dat_fmd_prev; static float dat_fmd(float2 baseband) { - float phase = carg(cdiv(baseband, dat_fmd_prev)); - dat_fmd_prev = baseband; + static float2 prev; + float phase = carg(cdiv(baseband, prev)); + prev = baseband; return clamp(dat_fmd_scale * phase, -1.0f, 1.0f); }