Issue #24326: Fixed audioop.ratecv() with non-default weightB argument.
Original patch by David Moore.
diff --git a/Modules/audioop.c b/Modules/audioop.c
index 8a3a275..0282c7e 100644
--- a/Modules/audioop.c
+++ b/Modules/audioop.c
@@ -1130,7 +1130,7 @@
     /* divide weightA and weightB by their greatest common divisor */
     d = gcd(weightA, weightB);
     weightA /= d;
-    weightA /= d;
+    weightB /= d;
 
     if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) {
         PyErr_SetString(PyExc_MemoryError,