debug
This commit is contained in:
parent
926183dbfe
commit
c8a10100b1
|
@ -14,12 +14,12 @@ srcChannelIndex = 46
|
|||
destChannelIndex = 47
|
||||
def my_callback(npData, dataSize, dataCount, sampleRate, numChannels, channelIndex):
|
||||
print(f"dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
|
||||
audioData = np.array([0, 1, -1, 0], dtype=np.int16)
|
||||
ret = rtc_plugins.sendCustomAudioData(srcChannelIndex, audioData, 48000, 1, len(audioData))
|
||||
if ret != 0:
|
||||
print(f"resend fail, ret:{ret}")
|
||||
else:
|
||||
print("resend succ")
|
||||
#audioData = np.array([0, 1, -1, 0], dtype=np.int16)
|
||||
#ret = rtc_plugins.sendCustomAudioData(srcChannelIndex, audioData, 48000, 1, len(audioData))
|
||||
#if ret != 0:
|
||||
# print(f"resend fail, ret:{ret}")
|
||||
#else:
|
||||
# print("resend succ")
|
||||
ret = rtc_plugins.init(destUserId, destDisplayName, destRoomId, my_callback)
|
||||
if ret != 0:
|
||||
print(f"init fail, ret:{ret}")
|
||||
|
@ -35,4 +35,10 @@ if ret != 0:
|
|||
|
||||
while True:
|
||||
print("recv")
|
||||
time.sleep(3)
|
||||
audioData = np.array([0, 1, -1, 0], dtype=np.int16)
|
||||
ret = rtc_plugins.sendCustomAudioData(srcChannelIndex, audioData, 48000, 1, len(audioData))
|
||||
if ret != 0:
|
||||
print(f"resend fail, ret:{ret}")
|
||||
else:
|
||||
print("resend succ")
|
||||
time.sleep(30)
|
||||
|
|
|
@ -498,7 +498,7 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i
|
|||
std::cout << "RTCContext::instance().registerSoundLevelListener() inUser failed, ret:" << ret1;
|
||||
return false;
|
||||
}
|
||||
/*
|
||||
|
||||
std::cout << "muteAudio" << std::endl;
|
||||
int16_t ret2 = rtcEngine_->muteAudio(destRoomId, srcUserId, mrtc::TYPE_AUDIO_SOURCE_CUSTOM, false, destChannelIndex);
|
||||
if (0 != ret2)
|
||||
|
@ -506,7 +506,7 @@ bool RTCContext::initRecv(const char* destRoomId, const char* srcUserId, const i
|
|||
std::cout << "RTCContext::instance().muteAudio() failed, ret:" << ret2;
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
std::cout << "init recv succ" << std::endl;
|
||||
return true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue