diff --git a/pyroomacoustics/libroom_src/rir_builder.cpp b/pyroomacoustics/libroom_src/rir_builder.cpp index 1c1ae92f..a2300263 100644 --- a/pyroomacoustics/libroom_src/rir_builder.cpp +++ b/pyroomacoustics/libroom_src/rir_builder.cpp @@ -324,22 +324,7 @@ void threaded_fractional_delay_impl( // relase the GIL from here on py::gil_scoped_release release; - for (size_t idx = 0; idx < n_times; idx++) { - // LUT interpolation - T x_off_frac = (1. - tim_acc(idx)) * lut_gran_f; - T lut_gran_off = std::floor(x_off_frac); - T x_off = (x_off_frac - lut_gran_off); - - int lut_pos = int(lut_gran_off); - for (size_t k = 0; k < fdl; lut_pos += lut_gran, k++) - out_acc(idx, k) = - hann[k] * - (sinc_lut[lut_pos] + - x_off * (sinc_lut[lut_pos + 1] - sinc_lut[lut_pos])); - } - // build the RIR - /* ThreadPool pool(num_threads); std::vector> results; for (size_t t_idx = 0; t_idx < num_threads; t_idx++) { @@ -366,7 +351,6 @@ void threaded_fractional_delay_impl( } for (auto &&result : results) result.get(); - */ } void fractional_delay(py::buffer out, const py::buffer time, size_t lut_gran, diff --git a/pyroomacoustics/libroom_src/rir_builder.hpp b/pyroomacoustics/libroom_src/rir_builder.hpp index fe7f3557..f4802a4c 100644 --- a/pyroomacoustics/libroom_src/rir_builder.hpp +++ b/pyroomacoustics/libroom_src/rir_builder.hpp @@ -17,6 +17,4 @@ void delay_sum(const py::buffer irs, const py::buffer delays, py::buffer output, void fractional_delay(py::buffer out, const py::buffer time, size_t lut_gran, size_t num_threads); -#include "rir_builder.cpp" - #endif // __RIR_BUILDER_HPP__ diff --git a/setup.py b/setup.py index ece0b76b..a91a0746 100644 --- a/setup.py +++ b/setup.py @@ -60,7 +60,7 @@ def __str__(self): ext_modules = [ Extension( "pyroomacoustics.libroom", - [os.path.join(libroom_src_dir, f) for f in ["libroom.cpp"]], + [os.path.join(libroom_src_dir, f) for f in ["libroom.cpp", "rir_builder.cpp"]], depends=libroom_files, include_dirs=[ ".",