debug
This commit is contained in:
parent
546bd7de4a
commit
826521ed83
|
@ -63,12 +63,11 @@ int sendCustomAudioData(const int16_t destChannelIndex, py::object pD, int32_t s
|
||||||
|
|
||||||
std::cout << "step 2" << std::endl;
|
std::cout << "step 2" << std::endl;
|
||||||
std::cout << "pyData ptr is:" << pyData.ptr() << std::endl;
|
std::cout << "pyData ptr is:" << pyData.ptr() << std::endl;
|
||||||
// 2. 检查是否是 numpy 数组
|
if (!pyData.ptr() || !Py_IsInitialized() || !PyObject_TypeCheck(pyData.ptr(), &PyBaseObject_Type)) {
|
||||||
if (!PyObject_Check(pyData.ptr())) {
|
|
||||||
std::cerr << "ERROR: Not a valid Python object" << std::endl;
|
|
||||||
throw std::runtime_error("Invalid Python object");
|
throw std::runtime_error("Invalid Python object");
|
||||||
}
|
}
|
||||||
std::cout << "step 2" << std::endl;
|
std::cout << "step 2" << std::endl;
|
||||||
|
// 2. 检查是否是 numpy 数组
|
||||||
if (!PyArray_Check(pyData.ptr())) {
|
if (!PyArray_Check(pyData.ptr())) {
|
||||||
std::cout << "input is notnumpy" << std::endl;
|
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");
|
||||||
|
|
Loading…
Reference in New Issue