This commit is contained in:
wangjiyu 2025-04-10 09:24:34 +08:00
parent 317a16849e
commit 9ce7630be8
1 changed files with 2 additions and 0 deletions

View File

@ -41,8 +41,10 @@ int sendCustomAudioData(const int16_t destChannelIndex, py::object pyData, int32
} }
std::cout << "step 2" << std::endl; std::cout << "step 2" << std::endl;
std::cout << "pyData ptr is:" << pyData.ptr() << std::endl;
// 2. 检查是否是 numpy 数组 // 2. 检查是否是 numpy 数组
if (!PyArray_Check(pyData.ptr())) { if (!PyArray_Check(pyData.ptr())) {
std::cout << "input is notnumpy" << std::endl;
throw std::runtime_error("Input is not a numpy array"); throw std::runtime_error("Input is not a numpy array");
} }