This commit is contained in:
wangjiyu 2025-04-15 16:27:28 +08:00
parent dc9dd314d6
commit 35febd4b41
1 changed files with 2 additions and 2 deletions

View File

@ -115,7 +115,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
Py_DECREF(repr); // 必须手动释放 Py_DECREF(repr); // 必须手动释放
} }
PyGILState_STATE gstate = PyGILState_Ensure(); //PyGILState_STATE gstate = PyGILState_Ensure();
pyCallback_( pyCallback_(
audioArray, // numpy 数组 audioArray, // numpy 数组
data_size, // 数据大小 data_size, // 数据大小
@ -124,7 +124,7 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
audioFrame.numChannels, audioFrame.numChannels,
audioFrame.channelIndex audioFrame.channelIndex
); );
PyGILState_Release(gstate); //PyGILState_Release(gstate);
std::cout << " after callback" << std::endl; std::cout << " after callback" << std::endl;
if (PyErr_Occurred()) { if (PyErr_Occurred()) {
PyObject *type, *value, *traceback; PyObject *type, *value, *traceback;