Meeting SDK Type and Version
Linux SDK v5.16.1.8573
Description
After I request recording privileges and get it approved by the host, I am starting raw recording and trying to subscribe to raw audio data. The subscribe
method returns error 32 (according to enum in zoom_sdk_def.h, it is SDKERR_NOT_JOIN_AUDIO. Also I am not getting onMixedAudioRawDataReceived and onOneWayAudioRawDataReceived handlers called.
Error?
Error occurred subscribing to audio: 32
How To Reproduce
Steps to reproduce the behavior including:
- Init SDK
- Authenticate SDK
- Join meeting:
ZOOM_SDK_NAMESPACE::JoinParam param;
param.userType = ZOOM_SDK_NAMESPACE::SDK_UT_WITHOUT_LOGIN;
ZOOM_SDK_NAMESPACE::JoinParam4WithoutLogin &withoutLoginParam = param.param.withoutloginuserJoin;
withoutLoginParam.meetingNumber = meetingId;
withoutLoginParam.userName = displayName.c_str();
withoutLoginParam.psw = password.c_str();
withoutLoginParam.isVideoOff = true; // set this to false when you want to enable video stream
withoutLoginParam.isAudioOff = false;
err = m_pMeetingService->SetEvent(new MeetingStatusEventListener(*this));
if (err == ZOOMSDK::SDKError::SDKERR_SUCCESS) {
std::cout << "MeetingStatusEventListener added." << std::endl;
} else {
cout << "Error: Unable to set event listener for meeting service: " << err << endl;
}
err = m_pMeetingService->Join(param);
if (err != ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS) {
std::cerr << "Error: Unable to join Zoom meeting: " << err << std::endl;
return false;
} else {
std::cout << "Joining Zoom meeting..." << std::endl;
}
- Wait for the MEETING_STATUS_INMEETING status. Request local recording privilege:
IMeetingRecordingController* meetingRecordingController = m_pMeetingService->GetMeetingRecordingController();
err = meetingRecordingController->SetEvent(new MeetingRecordingCtrlEventListener(*this));
if (err != ZOOM_SDK_NAMESPACE::SDKERR_SUCCESS) {
std::cerr << "Error: Unable to set event listener for meeting recording controller: " << err << std::endl;
return false;
} else {
std::cout << "MeetingRecordingCtrlEventListener added." << std::endl;
}
auto res = meetingRecordingController->RequestLocalRecordingPrivilege();
- Wait for the onRecordPrivilegeChanged event with bCanRec == TRUE
- Start local recording:
cout << "Starting raw recording..." << endl;
const auto pMeetingRecordingController = m_pMeetingService->GetMeetingRecordingController();
err = pMeetingRecordingController->StartRawRecording();
if(err != ZOOMSDK::SDKERR_SUCCESS)
{
cerr << "Failed to start raw recording with status " << err << endl;
return false;
}
cout << "Raw recording started. Subscribing to audio data..." << endl;
const auto pAudioRawDataDelegate = new AudioRawDataDelegate();
IZoomSDKAudioRawDataHelper* audioHelper;
audioHelper = ZOOM_SDK_NAMESPACE::GetAudioRawdataHelper();
if (audioHelper) {
err = audioHelper->subscribe(pAudioRawDataDelegate);
if (err != SDKERR_SUCCESS) {
std::cout << "Error occurred subscribing to audio: " << err << std::endl;
return false;
}
}
else {
std::cout << "Error getting audioHelper" << std::endl;
return false;
}
The output I am getting is as follows:
onMeetingStatusChanged: MEETING_STATUS_CONNECTING
2023-10-06T22:38:22.183385312Z onMeetingParameterNotification: 0x55967ea535c0
2023-10-06T22:38:22.533907159Z onMeetingStatusChanged: MEETING_STATUS_IN_WAITING_ROOM
2023-10-06T22:38:27.031188196Z onMeetingStatusChanged: MEETING_STATUS_RECONNECTING
2023-10-06T22:38:33.130676708Z onMeetingParameterNotification: 0x55967ea3ed00
2023-10-06T22:38:33.130695584Z onMeetingStatusChanged: MEETING_STATUS_CONNECTING
2023-10-06T22:38:33.469355833Z onMeetingStatusChanged: MEETING_STATUS_INMEETING
2023-10-06T22:38:33.469382005Z MeetingRecordingCtrlEventListener added.
2023-10-06T22:38:33.469385016Z Requested local recording privilege
2023-10-06T22:38:35.763139511Z Recording privilege granted
2023-10-06T22:38:35.763166036Z Starting raw recording...
2023-10-06T22:38:35.763343839Z Raw recording started. Subscribing to audio data...
2023-10-06T22:38:35.763354554Z Error occurred subscribing to audio: 32
2023-10-06T22:38:35.804660848Z Recording started
@chunsiong.zoom, could you take a look, please?