From c86294b1f07624eee3c3749fb877aff96413f17b Mon Sep 17 00:00:00 2001 From: Jon Nordby Date: Wed, 14 May 2025 19:55:05 +0200 Subject: bindings: Actually build cic3_pdm code --- bindings/galearn_pdm.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'bindings/galearn_pdm.cpp') diff --git a/bindings/galearn_pdm.cpp b/bindings/galearn_pdm.cpp index 5b7e4f5..541ba1a 100644 --- a/bindings/galearn_pdm.cpp +++ b/bindings/galearn_pdm.cpp @@ -1,11 +1,12 @@ #include #include -int sim(void); +int pdm2pcm_cic3(const uint8_t *pdm, int pdm_length, int16_t *pcm, int pcm_length); + namespace py = pybind11; -void process(py::array_t arr1, py::array_t arr2) { +int process(py::array_t arr1, py::array_t arr2) { // Check shapes or sizes if needed auto buf1 = arr1.request(); auto buf2 = arr2.request(); @@ -18,19 +19,12 @@ void process(py::array_t arr1, py::array_t arr2) { throw std::runtime_error("Input 1 must be same or larger than input 2"); } -#if 0 - // Example: access data uint8_t* in = static_cast(buf1.ptr); int16_t* out = static_cast(buf2.ptr); - for (int i=0; i