wfreerdp: fix build on Windows

This commit is contained in:
Marc-André Moreau 2013-03-29 00:33:15 -04:00
parent a318f8f129
commit c65ee0c2f4
6 changed files with 23 additions and 9 deletions

View File

@ -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 }
};

View File

@ -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;

View File

@ -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})

View File

@ -0,0 +1,2 @@
LIBRARY "libwinpr-environment"
EXPORTS

View File

@ -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);
/**

View File

@ -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