debug
This commit is contained in:
parent
4692afcc3b
commit
6fd9455d3f
|
@ -41,16 +41,17 @@ void RTCContext::onAudioProcess(const char* roomId, const char* peerId,
|
||||||
{
|
{
|
||||||
namespace py = boost::python;
|
namespace py = boost::python;
|
||||||
std::cout << "-----------------------------------" << std::endl;
|
std::cout << "-----------------------------------" << std::endl;
|
||||||
std::cout << "dataCount:" << audioFrame.dataCount << audioSourceType;
|
std::cout << "dataCount:" << audioFrame.dataCount << audioSourceType << std::endl;
|
||||||
if (!py_callback_.is_none()) {
|
if (!py_callback_.is_none()) {
|
||||||
std::cout << "python callback" << std::endl;
|
std::cout << "python callback" << std::endl;
|
||||||
npy_intp dims[1] = {audioFrame.dataCount};
|
npy_intp dims[1] = {audioFrame.dataCount};
|
||||||
|
std::cout << "step1" << std::endl;
|
||||||
PyObject* pyArray = PyArray_SimpleNewFromData(1, dims, NPY_INT16, audioFrame.data);
|
PyObject* pyArray = PyArray_SimpleNewFromData(1, dims, NPY_INT16, audioFrame.data);
|
||||||
|
std::cout << "step2" << std::endl;
|
||||||
py_callback_(py::handle<>(pyArray), audioFrame.dataCount, audioFrame.sampleRate, audioFrame.numChannels,
|
py_callback_(py::handle<>(pyArray), audioFrame.dataCount, audioFrame.sampleRate, audioFrame.numChannels,
|
||||||
audioFrame.channelIndex);
|
audioFrame.channelIndex);
|
||||||
|
std::cout << "step3" << std::endl;
|
||||||
}
|
}
|
||||||
//sendAudioData(audioFrame.channelIndex, audioFrame.data, audioFrame.sampleRate, audioFrame.numChannels,
|
|
||||||
// audioFrame.dataCount);
|
|
||||||
}
|
}
|
||||||
void RTCContext::onProducer(uint32_t msgId, mrtc::MRTCProducerInfo& info)
|
void RTCContext::onProducer(uint32_t msgId, mrtc::MRTCProducerInfo& info)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue