Fixed server format selection.

This commit is contained in:
Armin Novak 2018-09-25 16:32:37 +02:00
parent 16531e1437
commit d56efaae8b
3 changed files with 4 additions and 5 deletions

View File

@ -70,7 +70,7 @@ typedef struct _audin_server
* @return 0 on success, otherwise a Win32 error code
*/
static UINT audin_server_select_format(audin_server_context* context,
int client_format_index)
size_t client_format_index)
{
audin_server* audin = (audin_server*) context;
@ -81,7 +81,7 @@ static UINT audin_server_select_format(audin_server_context* context,
return ERROR_INVALID_DATA;
}
context->selected_client_format = client_format_index;
context->selected_client_format = (SSIZE_T)client_format_index;
if (!freerdp_dsp_context_reset(audin->dsp_context,
&audin->context.client_formats[client_format_index]))

View File

@ -28,7 +28,7 @@
typedef struct _audin_server_context audin_server_context;
typedef UINT(*psAudinServerSelectFormat)(audin_server_context* context, int client_format_index);
typedef UINT(*psAudinServerSelectFormat)(audin_server_context* context, size_t client_format_index);
typedef BOOL (*psAudinServerOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerIsOpen)(audin_server_context* context);
typedef BOOL (*psAudinServerClose)(audin_server_context* context);

View File

@ -60,8 +60,7 @@ static UINT AudinServerOpening(audin_server_context* context)
return CHANNEL_RC_OK;
}
context->SelectFormat(context, i);
return CHANNEL_RC_OK;
return IFCALLRESULT(ERROR_CALL_NOT_IMPLEMENTED, context->SelectFormat, context, i);
}
/**
* Function description