From 3970197fbf86fabf9a8ad6c847d82e6d5fd23f4c Mon Sep 17 00:00:00 2001 From: lyk Date: Tue, 14 Jan 2025 20:00:40 +0800 Subject: [PATCH] fix stereo audio dump (f-contig) --- py_src/core.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/py_src/core.cpp b/py_src/core.cpp index 39c606b..e099276 100644 --- a/py_src/core.cpp +++ b/py_src/core.cpp @@ -61,7 +61,7 @@ nb::module_& bind_synthesizer(nb::module_& m) { m.def( "dump_wav", [](const std::string& path, - const nb::ndarray, nb::device::cpu, nb::c_contig>& data, + const nb::ndarray, nb::device::cpu, nb::f_contig>& data, const i32 sample_rate, const bool use_int16) { psynth::WAVE_write( @@ -73,23 +73,6 @@ nb::module_& bind_synthesizer(nb::module_& m) { nb::arg("sample_rate"), nb::arg("use_int16") = true ); - - m.def( - "dump_wav", - [](const std::filesystem::path& path, - const nb::ndarray, nb::device::cpu, nb::c_contig>& data, - const i32 sample_rate, - const bool use_int16) { - const std::string path_str = path.string(); - psynth::WAVE_write( - path_str, data.shape(0), data.shape(1), sample_rate, data.data(), use_int16 - ); - }, - nb::arg("path"), - nb::arg("data"), - nb::arg("sample_rate"), - nb::arg("use_int16") = true - ); return m; }