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