From ea26e03ed93e0419b62c801c3c45bb9a80790f71 Mon Sep 17 00:00:00 2001 From: Clayton Smith Date: Tue, 12 Dec 2023 11:44:30 -0500 Subject: [PATCH] Set initial phase to zero --- sfmbase/PhaseDiscriminator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sfmbase/PhaseDiscriminator.cpp b/sfmbase/PhaseDiscriminator.cpp index f9be7f5..dedb46a 100644 --- a/sfmbase/PhaseDiscriminator.cpp +++ b/sfmbase/PhaseDiscriminator.cpp @@ -27,7 +27,8 @@ PhaseDiscriminator::PhaseDiscriminator(double max_freq_dev) : m_normalize_factor(max_freq_dev * 2.0 * M_PI), // boundary = M_PI / m_normalize_factor; - m_boundary(1.0 / (max_freq_dev * 2.0)) {} + m_boundary(1.0 / (max_freq_dev * 2.0)), + m_save_value(0) {} // Process samples. void PhaseDiscriminator::process(const IQSampleVector &samples_in,