xiph / rnnoise

Recurrent neural network for audio noise reduction
BSD 3-Clause "New" or "Revised" License
3.98k stars 890 forks source link

Windows and CMake support #88

Open almoghamdani opened 5 years ago

almoghamdani commented 5 years ago

This PR includes the following changes:

davidebeatrici commented 4 years ago

Regarding eb45832a2a39df6955a5da0c4aebf5586cd9c8e4: I would do something like mumble-voip@b30f2bb8049601c3b7253d47f75dc6a68c5f32fd, instead.

witaly-iwanow commented 4 years ago

Very welcome change! Autotools, VLAs and overlap with Opus source code are really annoying. The code does high quality denoising, but once you start deploying it on different platforms you realize it needs a lot of TLC around compilation/build process

tahnik commented 3 years ago

Is there a reason why this was never merged?

petterreinholdtsen commented 3 years ago

I'm not heavily involved in the development, but took the chance to merge the C++ header fix in #131, causing this change to no longer merge cleanly. Perhaps you can rebase it without the header change?

almoghamdani commented 3 years ago

@petterreinholdtsen I rebased and removed the header changes.

j-schultz commented 3 years ago

@almogh52 maybe you also want to have a look at my changes based on your branch which can be found here: https://github.com/alfatraining/rnnoise/commit/7d6f71f1a9f7153dc394258dd6ef7109ae79795b

These changes are mostly carried over from community-contributed CMake code for libspeex.

petterreinholdtsen commented 3 years ago

This pull request also remove two symbols from the list of exported symbols in the library.

Anyway, I suspect the different parts of this pull request should be handled and evaluated separately. At least I believe the introduction of a parallel build system should be decided independently of moving several local variables to the heap. Perhaps better to make separate pull reqeusts for each set of changes?

davidebeatrici commented 3 years ago

Once #164 is merged you can drop the VLA-related changes and just add to the CMake project the following:

if(MSVC)
    target_compile_definitions(rnnoise PRIVATE "USE_MALLOC")
endif()
wnpllrzodiac commented 3 years ago

@almoghamdani static win32 lib built. But I failed to integrated the lib into a win32 console project.

LNK2019 unreferenced symbol _opus_fft_c, _forward_transform refered from testRNNoise xxxxxxxx\testRNNoise\rnnoise.lib(denoise.obj)