This commit is contained in:
wangjiyu 2025-04-10 12:47:13 +08:00
parent 3667d3262b
commit 9d0ed138ff
1 changed files with 3 additions and 1 deletions

View File

@ -69,13 +69,15 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
try {
std::cout << "-----------------------------------" << std::endl;
std::cout << "dataCount:" << audioFrame.dataCount << std::endl;
std::cout << "dataCount value: " << audioFrame.dataCount
<< " (max: " << std::numeric_limits<npy_intp>::max() << ")" << std::endl;
if (!audioFrame.data || audioFrame.dataCount <= 0) {
std::cerr << "Invalid audio frame data" << std::endl;
PyGILState_Release(gstate);
return;
}
std::cout << "step1" << std::endl;
npy_intp dims[1] = {audioFrame.dataCount};
npy_intp dims[1] = {static_cast<npy_intp>(audioFrame.dataCount)};
std::cout << "step2" << std::endl;
PyObject* pyArray = PyArray_SimpleNew(1, dims, NPY_INT16);