From ae752bf1f7fb15d5f326a6496a080e5fdd1c5ae0 Mon Sep 17 00:00:00 2001 From: parking_turkeys Date: Tue, 20 Oct 2026 09:16:00 -0400 Subject: [PATCH] realized i did pitch v wrong so just saying that :p --- get_pitch.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/get_pitch.c b/get_pitch.c index 8ae18a4..71bed29 100644 --- a/get_pitch.c +++ b/get_pitch.c @@ -1,8 +1,23 @@ #include "colon3sampler.h" static int is_through_zero(int16_t last, int16_t current); +static float old_get_pitch(int16_t w[], int w_B); float get_pitch(int16_t w[], int w_B) { + return old_get_pitch(w, w_B); +}; + +static int is_through_zero(int16_t l, int16_t c) +{ + if (c == 0) return 1; + if ((c > 0) && (l < 0)) return 1; + if ((c < 0) && (l > 0)) return 1; + return 0; +}; + +static float old_get_pitch(int16_t w[], int w_B) +{ + /* this is very wrong lmao */ /* count the things. */ int P = 0; int P_i = 0; int *Ps = malloc(w_B); @@ -40,13 +55,4 @@ float get_pitch(int16_t w[], int w_B) return frq; error: return -1; - -}; - -static int is_through_zero(int16_t l, int16_t c) -{ - if (c == 0) return 1; - if ((c > 0) && (l < 0)) return 1; - if ((c < 0) && (l > 0)) return 1; - return 0; }; -- 2.47.3