From e7b19b4e9aeab6f346c2176962cfeb988c03264c Mon Sep 17 00:00:00 2001 From: wangjiyu Date: Thu, 10 Apr 2025 15:46:57 +0800 Subject: [PATCH] debug --- util/RTCContext.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/util/RTCContext.cpp b/util/RTCContext.cpp index d768c28..4e3b6bd 100644 --- a/util/RTCContext.cpp +++ b/util/RTCContext.cpp @@ -63,12 +63,6 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId, { namespace py = boost::python; - // 1. 获取 GIL(绝对必要) - if (!Py_IsInitialized()) { - std::cerr << "Python interpreter not initialized" << std::endl; - return; - } - boost::python::gil_scoped_acquire gil; PyGILState_STATE gstate = PyGILState_Ensure(); try { @@ -99,7 +93,6 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId, // 5. 创建NumPy数组(带内存保护) PyObject* pyArray = nullptr; { - py::gil_scoped_acquire gil; // 确保在创建数组时持有GIL pyArray = PyArray_SimpleNew(1, dims, NPY_INT16); if (!pyArray) { PyGILState_Release(gstate);