From 475bc7227725cf002558cd6e4224a110831c29f5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 28 Jul 2003 18:01:00 +0000 Subject: moved st_gcd to resample.cpp svn-id: r9257 --- sound/resample.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sound/resample.cpp') diff --git a/sound/resample.cpp b/sound/resample.cpp index b2758f4517..8796989967 100644 --- a/sound/resample.cpp +++ b/sound/resample.cpp @@ -109,6 +109,15 @@ int makeFilter(Float Imp[], static long SrcUD(resample_t r, long Nx); static long SrcEX(resample_t r, long Nx); +/* here for linear interp. might be useful for other things */ +static st_rate_t st_gcd(st_rate_t a, st_rate_t b) +{ + if (b == 0) + return a; + else + return st_gcd(b, a % b); +} + /* * Process options -- cgit v1.2.3