This commit is contained in:
wangjiyu 2025-04-16 10:45:48 +08:00
parent 8a2389bf68
commit c58d016357
2 changed files with 4 additions and 2 deletions

View File

@ -16,8 +16,9 @@ destRoomId = srcRoomId
srcChannelIndex = 46
destChannelIndex = 47
def my_callback_r(shmName, dataSize, dataCount, sampleRate, numChannels, channelIndex):
print(f"dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
print(f"my_callback_r, dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
print(f"data:{shmName}")
print("after my_callback_r")
#fd = os.open(shmName, os.O_RDONLY)
#if fd == -1:
# raise RuntimeError(f"无法打开共享内存 {shmName}")

View File

@ -13,8 +13,9 @@ destRoomId = srcRoomId
srcChannelIndex = 46
destChannelIndex = 47
def my_callback(shmName, dataCount, sampleRate, numChannels, channelIndex):
print(f"dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
print(f"my_callback, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
print(f"data:{shmName}")
print("after my_callback")
ret = rtc_plugins.init(srcUserId, srcDisplayName, srcRoomId, my_callback)
if ret != 0:
print(f"init fail, ret:{ret}")