diff --git a/rtc_plugins.cpp b/rtc_plugins.cpp index 2006cc1..b18e7b2 100644 --- a/rtc_plugins.cpp +++ b/rtc_plugins.cpp @@ -13,11 +13,7 @@ void** get_numpy_api() { namespace py = boost::python; int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId, boost::python::object callback) { - if (!PyArray_API) { - std::cout << "PyArray_API is null in outer init" << std::endl; - } else { - std::cout << "PyArray_API is not null in outer init" << std::endl; - } + RTCContext::instance().setPyCallback(callback); bool res = RTCContext::instance().init(selfUserId, selfDisplayName, selfRoomId); if (res) { @@ -27,11 +23,7 @@ int init(const char* selfUserId, const char* selfDisplayName, const char* selfRo } } int initRecv(const char* destRoomId, const char* srcUserId, const int16_t destChannelIndex) { - if (!PyArray_API) { - std::cout << "PyArray_API is null in outer initRecv" << std::endl; - } else { - std::cout << "PyArray_API is not null in outer initRecv" << std::endl; - } + bool res = RTCContext::instance().initRecv(destRoomId, srcUserId, destChannelIndex); if (res) { return 0; @@ -39,8 +31,8 @@ int initRecv(const char* destRoomId, const char* srcUserId, const int16_t destCh return -1; } } -int initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex) { - bool res = RTCContext::instance().initSend(srcRoomId, destRoomId, destChannelIndex); +int initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex, const uint8_t channelNum) { + bool res = RTCContext::instance().initSend(srcRoomId, destRoomId, destChannelIndex, channelNum); if (res) { return 0; } else {