debug
This commit is contained in:
parent
81a6bc7c6f
commit
d4cf9b8d70
|
@ -65,10 +65,6 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
|
|
||||||
// 1. 获取GIL
|
// 1. 获取GIL
|
||||||
std::cout << "[1] 获取GIL锁..." << std::endl;
|
std::cout << "[1] 获取GIL锁..." << std::endl;
|
||||||
if (!Py_IsInitialized()) {
|
|
||||||
std::cerr << "Python 解释器未初始化!" << std::endl;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#ifdef GIL
|
#ifdef GIL
|
||||||
PyGILState_STATE gstate = PyGILState_Ensure();
|
PyGILState_STATE gstate = PyGILState_Ensure();
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,6 +101,10 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
std::cout << "当前线程是否持有 GIL: " << PyGILState_Check() << std::endl;
|
std::cout << "当前线程是否持有 GIL: " << PyGILState_Check() << std::endl;
|
||||||
np::dtype dtype = np::dtype::get_builtin<int16_t>();
|
np::dtype dtype = np::dtype::get_builtin<int16_t>();
|
||||||
std::cout << "init dtype" << std::endl;
|
std::cout << "init dtype" << std::endl;
|
||||||
|
if (!Py_IsInitialized()) {
|
||||||
|
std::cerr << "Python 解释器未初始化!" << std::endl;
|
||||||
|
return;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
py::object str_repr = py::str(dtype);
|
py::object str_repr = py::str(dtype);
|
||||||
std::cout << "str_repr" << std::endl;
|
std::cout << "str_repr" << std::endl;
|
||||||
|
|
Loading…
Reference in New Issue