diff --git a/util/RTCContext.cpp b/util/RTCContext.cpp index 88029d4..e228c4f 100644 --- a/util/RTCContext.cpp +++ b/util/RTCContext.cpp @@ -101,16 +101,10 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId, // 增加引用计数防止提前释放 //Py_INCREF(pyCallback_.ptr()); try { - /* - std::cout << " pyCallback_ type: " << Py_TYPE(pyCallback_.ptr())->tp_name << std::endl; - PyObject* repr = PyObject_Repr(pyCallback_.ptr()); - if (repr) { - std::cout << " pyCallback_ repr: " << PyUnicode_AsUTF8(repr) << std::endl; - Py_DECREF(repr); // 必须手动释放 - } - */ //PyGILState_STATE gstate = PyGILState_Ensure(); + std::cout << "data:" << audioFrame.data << std::endl; + std::cout << "当前线程是否持有 GIL: " << PyGILState_Check() << std::endl; np::ndarray audioArray = np::from_data( audioFrame.data, // 数据指针 dtype, // 数据类型 (int16)