# Send Raw Audio using Windows Meeting SDK

**URL:** <https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486>\
**Category:** Windows\
**Created:** [December 4, 2023, 2:09pm UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486 "2023-12-04T14:09:21Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![chloe3](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chloe3/32/53219_2.png) [@chloe3](https://devforum.zoom.us/u/chloe3)\
**Post date:** [December 4, 2023, 2:09pm UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/1 "2023-12-04T14:09:21Z")

</div>

**Description**  
I have been using the samples from here - [GitHub - tanchunsiong/MSDK\_RawDataDemos at 50f292d5cc859d9931a084b67fff912a964e7d8f](https://github.com/tanchunsiong/MSDK_RawDataDemos/tree/50f292d5cc859d9931a084b67fff912a964e7d8f)

I have the video and screenshare working as soon as my bot joins the call, however, I am running into issues with audio - it only seems to work when the unmute button is pressed, is there a way to get the audio to play as soon as the bot joins? When I update the code to allow the bot to join with audio on, it still only seems to play the audio when I mute and then unmute the bot.

I noticed this //TODO comment in the code and was wondering if there is a code snippet that could solve this - [https://github.com/tanchunsiong/MSDK\_RawDataDemos/blob/50f292d5cc859d9931a084b67fff912a964e7d8f/SendAudioRawData/MSDK\_SendAudioRawData.cpp#L61-L78](https://github.com/tanchunsiong/MSDK_RawDataDemos/blob/50f292d5cc859d9931a084b67fff912a964e7d8f/SendAudioRawData/MSDK_SendAudioRawData.cpp#L61-L78)

Thanks,  
Chloe

---

<div class="post-metadata">

**Author:** ![freelancer.nak](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/freelancer.nak/32/40968_2.png) [@freelancer.nak](https://devforum.zoom.us/u/freelancer.nak)\
**Post date:** [December 4, 2023, 2:21pm UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/2 "2023-12-04T14:21:52Z")

</div>

@chloe3 Hope you will be fine. Please DM me I will help you with that. Thanks

---

<div class="post-metadata">

**Author:** ![chloe3](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chloe3/32/53219_2.png) [@chloe3](https://devforum.zoom.us/u/chloe3)\
**Post date:** [December 4, 2023, 4:55pm UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/3 "2023-12-04T16:55:29Z")

</div>

Thanks @freelancer.nak, I sent you a DM on LinkedIn!

---

<div class="post-metadata">

**Author:** ![chloe3](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chloe3/32/53219_2.png) [@chloe3](https://devforum.zoom.us/u/chloe3)\
**Post date:** [December 6, 2023, 11:12am UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/4 "2023-12-06T11:12:25Z")

</div>

I’m not sure if this pop up could be causing the error:

![Screenshot 2023-12-06 at 11.08.09](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/3/a/3a59e899c8c7116930803de20a64773aa4225297.png)

When I close this pop-up I can see the virtual mic is set and it is unmuted:  
 ![Screenshot 2023-12-06 at 11.08.31](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/b/0/b0143c813a13567dd0221488eed3d48f289bfc2d.png)

But the audio will only play on the call, when I hit the microphone to mute it and then press it again to unmute - on this second press the audio plays as expected.

I can see the onMicInitialize is called, but it looks like onMicStartSend only gets triggered when I unmute the bot.

The goal is to get the bot to play the audio as soon as it joins the call.

---

<div class="post-metadata">

**Author:** ![chloe3](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chloe3/32/53219_2.png) [@chloe3](https://devforum.zoom.us/u/chloe3)\
**Post date:** [December 6, 2023, 2:31pm UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/5 "2023-12-06T14:31:56Z")

</div>

@chunsiong.zoom have you got any advice on if this is possible or how to solve it?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [December 13, 2023, 3:57am UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/6 "2023-12-13T03:57:49Z")

</div>

@chloe3 I don’t have a best practice for this yet, however for testing / sample purposes I unmute my audio when I receive a specific message event.

---

<div class="post-metadata">

**Author:** ![chloe3](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chloe3/32/53219_2.png) [@chloe3](https://devforum.zoom.us/u/chloe3)\
**Post date:** [January 4, 2024, 11:50am UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/7 "2024-01-04T11:50:35Z")

</div>

@chunsiong.zoom thanks for your response, have you got an example of unmuting when you receive a specific message event?

---

<div class="post-metadata">

**Author:** ![chunsiong.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/chunsiong.zoom/32/35488_2.png) [@chunsiong.zoom](https://devforum.zoom.us/u/chunsiong.zoom)\
**Post date:** [January 5, 2024, 12:26am UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/8 "2024-01-05T00:26:06Z")

</div>

@chloe3

```auto
//these are in the MeetingChatEventListener.cpp
MeetingChatEventListener::MeetingChatEventListener(void(*turnOnSendVideoAndAudio)(), void(*turnOffSendVideoAndAudio)()) {

	turnOnSendVideoAndAudio_ = turnOnSendVideoAndAudio;
	turnOffSendVideoAndAudio_ = turnOffSendVideoAndAudio;
}

void MeetingChatEventListener::onChatMsgNotifcation(IChatMsgInfo* chatMsg, const zchar_t* content)
{
	if (ZCharStringMatches(chatMsg->GetContent(),"turnOn")) {
		turnOnSendVideoAndAudio_();
	}
	else if (ZCharStringMatches(chatMsg->GetContent(), "turnOff")) {
		turnOffSendVideoAndAudio_();
	}
	std::cout<<"onChatMsgNotifcation: " << chatMsg->GetSenderDisplayName() << " says " << chatMsg->GetContent() << endl;

}

```

```auto
//these are in the main class

//set the event handler and pass in method which can be used to call back on the main thread.
m_pMeetingService->GetMeetingChatController()->SetEvent(new MeetingChatEventListener(&turnOnSendVideoAndAudio, &turnOffSendVideoandAudio));

void turnOnSendVideoAndAudio() {
	//testing WIP
	if (SendVideoRawData) {
		IMeetingVideoController* meetingVidController = m_pMeetingService->GetMeetingVideoController();
		meetingVidController->UnmuteVideo();
	}
	//testing WIP
	if (SendAudioRawData) {
		IMeetingAudioController* meetingAudController = m_pMeetingService->GetMeetingAudioController();
		meetingAudController->JoinVoip();
		printf("Is my audio muted: %d\n", getMyself()->IsAudioMuted());
		//meetingAudController->MuteAudio(getMyself()->GetUserID(),true);
		meetingAudController->UnMuteAudio(getMyself()->GetUserID());

		//m_pSettingService->GetAudioSettings()->GetMicList();
		//m_pSettingService->GetAudioSettings()->UseDefaultSystemMic();
	}
}
void turnOffSendVideoandAudio() {
	//testing WIP
	if (SendVideoRawData) {
		IMeetingVideoController* meetingVidController = m_pMeetingService->GetMeetingVideoController();
		meetingVidController->MuteVideo();
	}
	//testing WIP
	if (SendAudioRawData) {
		IMeetingAudioController* meetingAudController = m_pMeetingService->GetMeetingAudioController();
		meetingAudController->MuteAudio(getMyself()->GetUserID(),true);

	}
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [February 4, 2024, 10:26am UTC](https://devforum.zoom.us/t/send-raw-audio-using-windows-meeting-sdk/99486/9 "2024-02-04T10:26:26Z")

</div>

Closed on February 4, 2024, 10:26am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
