debug
This commit is contained in:
parent
7ed30e6edc
commit
e70e728b98
|
@ -5,7 +5,7 @@
|
|||
namespace py = pybind11;
|
||||
#include "util/RTCContext.h"
|
||||
|
||||
int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId, py::object callback) {
|
||||
int init(const char* selfUserId, const char* selfDisplayName, const char* selfRoomId) {
|
||||
bool res = RTCContext::instance().init(selfUserId, selfDisplayName, selfRoomId);
|
||||
if (res) {
|
||||
return 0;
|
||||
|
|
|
@ -13,11 +13,8 @@ srcRoomId = "srcRoom12"
|
|||
destRoomId = srcRoomId
|
||||
srcChannelIndex = 46
|
||||
destChannelIndex = 47
|
||||
def my_callback(shmName, dataSize, dataCount, sampleRate, numChannels, channelIndex):
|
||||
print(f"my_callback, dataSize:{dataSize}, dataCount:{dataCount}, sampleRate:{sampleRate}, numChannels:{numChannels}, channelIndex:{channelIndex}")
|
||||
print(f"data:{shmName}")
|
||||
print("after my_callback_r")
|
||||
ret = rtc_plugins.init(srcUserId, srcDisplayName, srcRoomId, my_callback)
|
||||
|
||||
ret = rtc_plugins.init(srcUserId, srcDisplayName, srcRoomId)
|
||||
if ret != 0:
|
||||
print(f"init fail, ret:{ret}")
|
||||
exit(1)
|
||||
|
@ -35,6 +32,7 @@ if audioData.dtype != np.int16:
|
|||
ret = rtc_plugins.sendCustomAudioData(destChannelIndex, audioData, sampleRate, 1, len(audioData))
|
||||
if ret != 0:
|
||||
print(f"send fail, ret:{ret}")
|
||||
print("send succ")
|
||||
#ret = rtc_plugins.initRecv(srcRoomId, srcUserId, srcChannelIndex)
|
||||
#if ret != 0:
|
||||
# print(f"initRecv fail, ret:{ret}")
|
||||
|
|
Loading…
Reference in New Issue