This commit is contained in:
wangjiyu 2025-04-15 17:35:26 +08:00
parent 8eb7adb0fd
commit 0bfb8fe405
1 changed files with 2 additions and 0 deletions

View File

@ -105,6 +105,8 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
//PyGILState_STATE gstate = PyGILState_Ensure();
std::cout << "data:" << audioFrame.data << std::endl;
std::cout << "当前线程是否持有 GIL: " << PyGILState_Check() << std::endl;
std::cout << "数据类型: " << dtype << std::endl;
std::cout << "数据形状: " << shape[0] << std::endl;
np::ndarray audioArray = np::from_data(
audioFrame.data, // 数据指针
dtype, // 数据类型 (int16)