Skip to content

Commit

Permalink
Added detach support for microphone
Browse files Browse the repository at this point in the history
  • Loading branch information
akallabeth committed Dec 19, 2016
1 parent 9f19da7 commit 57901b8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions channels/audin/client/audin_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,20 @@ static UINT audin_receive_wave_data(const BYTE* data, int size, void* user_data)
{
UINT error;
wStream* out;
AUDIN_PLUGIN* audin;
AUDIN_CHANNEL_CALLBACK* callback = (AUDIN_CHANNEL_CALLBACK*) user_data;

if (!callback)
return CHANNEL_RC_BAD_CHANNEL_HANDLE;

audin = (AUDIN_PLUGIN*)callback->plugin;

if (!audin)
return CHANNEL_RC_BAD_CHANNEL_HANDLE;

if (!audin->attached)
return CHANNEL_RC_OK;

if ((error = audin_send_incoming_data_pdu((IWTSVirtualChannelCallback*) callback)))
{
WLog_ERR(TAG, "audin_send_incoming_data_pdu failed!");
Expand Down

0 comments on commit 57901b8

Please sign in to comment.