jpcima / zita-resampler-mod

Zita-resampler (personal fork). This is a C++ library for sample rate conversion of audio signals.
GNU General Public License v3.0
21 stars 2 forks source link

M_PI not defined in resampler-table.cc on Windows #1

Open itlods opened 5 years ago

itlods commented 5 years ago

Hi Sorry for not providing a patch, I am not that familiar with CMAKE. I get an error when using it on Windows (VS2015). Not sure why, but looking in the math.h you have to define _USE_MATH_DEFINES for this to work :-| So I did this - it is probably harmless on other platforms, but perhaps CMAKE can handle a bit nicer?

include

include

+#define _USE_MATH_DEFINES yes,please

include

jpcima commented 5 years ago

Hello. I pushed an update into master. Thanks for reporting, I don't usually check on Visual Studio.

vignesh-arbadev commented 3 years ago

Can we use this library on windows (msvc compiler)?

itlods commented 3 years ago

Yes, you can! I have used it to great effect on VS2015 and VS2017 (toolset 140 and 141). I down-sampled to 48kHz, and used variable resample to fit the signal to the variable speed of the sound board. (using a couple of small buffers) dynamically adjusting the resampling to keep the number of filled buffers constant. I played a 1000 Hz sine and my naked ear could not hear any wow, even though a debug print told me it was adjusting the resampling. My freq. counter only has 3 1/2 digit but these were fixed on 1000:-)