This commit is contained in:
wangjiyu 2025-04-15 16:50:27 +08:00
parent 6a2639661f
commit 012a95f475
1 changed files with 4 additions and 12 deletions

View File

@ -13,11 +13,7 @@ void** get_numpy_api() {
namespace py = boost::python; namespace py = boost::python;
int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId, boost::python::object callback) { 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); RTCContext::instance().setPyCallback(callback);
bool res = RTCContext::instance().init(selfUserId, selfDisplayName, selfRoomId); bool res = RTCContext::instance().init(selfUserId, selfDisplayName, selfRoomId);
if (res) { 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) { 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); bool res = RTCContext::instance().initRecv(destRoomId, srcUserId, destChannelIndex);
if (res) { if (res) {
return 0; return 0;
@ -39,8 +31,8 @@ int initRecv(const char* destRoomId, const char* srcUserId, const int16_t destCh
return -1; return -1;
} }
} }
int initSend(const char* srcRoomId, const char* destRoomId, const int16_t 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); bool res = RTCContext::instance().initSend(srcRoomId, destRoomId, destChannelIndex, channelNum);
if (res) { if (res) {
return 0; return 0;
} else { } else {