mirror of
https://github.com/FreeRDP/FreeRDP.git
synced 2024-11-27 11:54:44 +08:00
wfreerdp: fix build on Windows
This commit is contained in:
parent
a318f8f129
commit
c65ee0c2f4
@ -30,7 +30,6 @@ AQRecorderState recorderState;
|
||||
|
||||
static const AUDIO_FORMAT supported_audio_formats[] =
|
||||
{
|
||||
|
||||
{ WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, NULL },
|
||||
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, NULL }
|
||||
};
|
||||
|
@ -40,10 +40,10 @@
|
||||
|
||||
#endif
|
||||
|
||||
static const AUDIO_FORMAT audio_formats[] =
|
||||
{
|
||||
{ WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, NULL },
|
||||
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, NULL }
|
||||
static const AUDIO_FORMAT supported_audio_formats[] =
|
||||
{
|
||||
{ WAVE_FORMAT_PCM, 2, 44100, 176400, 4, 16, 0, NULL },
|
||||
{ WAVE_FORMAT_ALAW, 2, 22050, 44100, 2, 8, 0, NULL }
|
||||
};
|
||||
|
||||
static void wf_peer_rdpsnd_activated(rdpsnd_server_context* context)
|
||||
@ -65,7 +65,7 @@ static void wf_peer_rdpsnd_activated(rdpsnd_server_context* context)
|
||||
(context->client_formats[i].nSamplesPerSec == context->server_formats[j].nSamplesPerSec))
|
||||
{
|
||||
printf("agreed on format!\n");
|
||||
wfi->agreed_format = (AUDIO_FORMAT*)&context->server_formats[j];
|
||||
wfi->agreed_format = (AUDIO_FORMAT*) &context->server_formats[j];
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -149,9 +149,9 @@ BOOL wf_peer_rdpsnd_init(wfPeerContext* context)
|
||||
context->rdpsnd = rdpsnd_server_context_new(context->vcm);
|
||||
context->rdpsnd->data = context;
|
||||
|
||||
context->rdpsnd->server_formats = audio_formats;
|
||||
context->rdpsnd->server_formats = supported_audio_formats;
|
||||
context->rdpsnd->num_server_formats =
|
||||
sizeof(audio_formats) / sizeof(audio_formats[0]);
|
||||
sizeof(supported_audio_formats) / sizeof(supported_audio_formats[0]);
|
||||
|
||||
context->rdpsnd->src_format.wFormatTag = 1;
|
||||
context->rdpsnd->src_format.nChannels = 2;
|
||||
|
@ -21,6 +21,10 @@ set(MODULE_PREFIX "WINPR_ENVIRONMENT")
|
||||
set(${MODULE_PREFIX}_SRCS
|
||||
environment.c)
|
||||
|
||||
if(MSVC AND (NOT MONOLITHIC_BUILD))
|
||||
set(${MODULE_PREFIX}_SRCS ${${MODULE_PREFIX}_SRCS} module.def)
|
||||
endif()
|
||||
|
||||
add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
SOURCES ${${MODULE_PREFIX}_SRCS})
|
||||
|
2
winpr/libwinpr/environment/module.def
Normal file
2
winpr/libwinpr/environment/module.def
Normal file
@ -0,0 +1,2 @@
|
||||
LIBRARY "libwinpr-environment"
|
||||
EXPORTS
|
@ -37,7 +37,7 @@ int TestPrint(int argc, char* argv[])
|
||||
_printf("%d\n",b);
|
||||
_printf("%3d\n",b);
|
||||
_printf("%03d\n",b);
|
||||
c = 15.3; d = c / 3;
|
||||
c = 15.3f; d = c / 3;
|
||||
_printf("%3.2f\n",d);
|
||||
|
||||
/**
|
||||
|
@ -408,6 +408,11 @@ typedef trio_longlong_t trio_int64_t;
|
||||
* Internal Definitions
|
||||
*/
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable: 4244)
|
||||
#endif
|
||||
|
||||
#if TRIO_FEATURE_FLOAT
|
||||
|
||||
# if !defined(DECIMAL_DIG)
|
||||
@ -7846,3 +7851,7 @@ TRIO_ARGS1((errorcode),
|
||||
return "Unknown";
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user