debug
This commit is contained in:
parent
8a106b2d07
commit
02cca8f111
|
@ -334,8 +334,11 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
// 6. 拷贝数据到共享内存
|
// 6. 拷贝数据到共享内存
|
||||||
std::cout << "[6] 拷贝音频数据到共享内存..." << std::endl;
|
std::cout << "[6] 拷贝音频数据到共享内存..." << std::endl;
|
||||||
memcpy(ptr, audioFrame.data, data_size);
|
memcpy(ptr, audioFrame.data, data_size);
|
||||||
|
std::cout << "step1" << std::endl;
|
||||||
npy_intp shape[1] = { static_cast<npy_intp>(audioFrame.dataCount) };
|
npy_intp shape[1] = { static_cast<npy_intp>(audioFrame.dataCount) };
|
||||||
|
std::cout << "step2" << std::endl;
|
||||||
np::dtype dtype = np::dtype::get_builtin<int16_t>();
|
np::dtype dtype = np::dtype::get_builtin<int16_t>();
|
||||||
|
std::cout << "step3" << std::endl;
|
||||||
np::ndarray audioArray = np::from_data(
|
np::ndarray audioArray = np::from_data(
|
||||||
audioFrame.data, // 数据指针
|
audioFrame.data, // 数据指针
|
||||||
dtype, // 数据类型 (int16)
|
dtype, // 数据类型 (int16)
|
||||||
|
|
Loading…
Reference in New Issue