From 715687e85cfb3259f218c3874b19a96178bc0160 Mon Sep 17 00:00:00 2001 From: wangjiyu Date: Tue, 15 Apr 2025 23:21:48 +0800 Subject: [PATCH] debug --- rtc_plugins.cpp | 4 ++-- util/RTCContext.cpp | 4 +++- util/RTCContext.h | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/rtc_plugins.cpp b/rtc_plugins.cpp index add3b0d..79ce811 100644 --- a/rtc_plugins.cpp +++ b/rtc_plugins.cpp @@ -39,8 +39,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 int16_t channelNum) { + bool res = RTCContext::instance().initSend(srcRoomId, destRoomId, destChannelIndex, channelNum); if (res) { return 0; } else { diff --git a/util/RTCContext.cpp b/util/RTCContext.cpp index 515938f..8251d43 100644 --- a/util/RTCContext.cpp +++ b/util/RTCContext.cpp @@ -561,7 +561,8 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i return true; } -bool RTCContext::initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex) +bool RTCContext::initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex, + const uint8_t channelNum) { while (!isOnRoom_) { @@ -586,6 +587,7 @@ bool RTCContext::initSend(const char* srcRoomId, const char* destRoomId, const i strcpy(option.dstRoomId, destRoomId); } option.channelIndex = destChannelIndex; + option.channel = channelNum; std::cout << "startCustomAudio" << std::endl; int16_t ret2 = rtcEngine_->startCustomAudio(option); if (ret2 != 0) diff --git a/util/RTCContext.h b/util/RTCContext.h index ea49ad0..2eb131a 100644 --- a/util/RTCContext.h +++ b/util/RTCContext.h @@ -84,7 +84,7 @@ public: mrtc::IMRTCEngine* getRtcEngine() const; bool init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId); bool initRecv(const char* destRoomId, const char* srcUserId, const int16_t destChannelIndex); - bool initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex); + bool initSend(const char* srcRoomId, const char* destRoomId, const int16_t destChannelIndex, const uint8_t channelNum); void* getpData() const; void setpData(void* pData);