This commit is contained in:
wangjiyu 2025-04-15 10:10:01 +08:00
parent e3f8351db4
commit f4563d5fb5
1 changed files with 2 additions and 0 deletions

View File

@ -16,6 +16,8 @@ def my_callback(npData, dataSize, dataCount, sampleRate, numChannels, channelInd
print(f"dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}") print(f"dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
audioData = np.array([0, 1, -1, 0], dtype=np.int16) audioData = np.array([0, 1, -1, 0], dtype=np.int16)
ret = rtc_plugins.sendCustomAudioData(srcChannelIndex, audioData, 48000, 1, len(audioData)) ret = rtc_plugins.sendCustomAudioData(srcChannelIndex, audioData, 48000, 1, len(audioData))
if ret != 0:
print(f"resend fail, ret:{ret}")
ret = rtc_plugins.init(destUserId, destDisplayName, destRoomId, my_callback) ret = rtc_plugins.init(destUserId, destDisplayName, destRoomId, my_callback)
if ret != 0: if ret != 0:
print(f"init fail, ret:{ret}") print(f"init fail, ret:{ret}")