This commit is contained in:
wangjiyu 2025-04-10 09:13:12 +08:00
parent 420145ee47
commit d7b0bc221c
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ int sendCustomAudioData(const int16_t destChannelIndex, py::object pyData, int32
std::cout << "step1" << std::endl;
// 检查是否为 numpy 数组
if (!PyArray_Check(pyData.ptr())) {
std::cout << "check fail, ptr:" << pyData.ptr() << std::endl;
PyErr_SetString(PyExc_TypeError, "Expected a numpy array");
throw py::error_already_set();
}