debug
This commit is contained in:
parent
7ee951c2a5
commit
ab19010a9e
|
@ -103,11 +103,21 @@ int sendCustomAudioData(const int16_t destChannelIndex, py::object pD, int32_t s
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
void init_numpy() {
|
||||||
BOOST_PYTHON_MODULE(rtc_plugins) {
|
if (import_array() < 0) {
|
||||||
import_array();
|
throw std::runtime_error("NumPy initialization failed");
|
||||||
py::def("init", &init);
|
}
|
||||||
py::def("initRecv", &initRecv);
|
}
|
||||||
py::def("initSend", &initSend);
|
BOOST_PYTHON_MODULE(rtc_plugins) {
|
||||||
py::def("sendCustomAudioData", &sendCustomAudioData);
|
try {
|
||||||
|
init_numpy();
|
||||||
|
// 注册函数...
|
||||||
|
py::def("init", &init);
|
||||||
|
py::def("initRecv", &initRecv);
|
||||||
|
py::def("initSend", &initSend);
|
||||||
|
py::def("sendCustomAudioData", &sendCustomAudioData);
|
||||||
|
} catch (...) {
|
||||||
|
PyErr_SetString(PyExc_RuntimeError, "Module initialization failed");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue