fix some warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@228 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
e7c060b8b9
commit
7a5aa1186a
|
@ -68,7 +68,7 @@
|
|||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)/mod_bridgecall.pdb"
|
||||
SubSystem="2"
|
||||
ImportLibrary="$(OutDir)/mod_bridgecall.lib"
|
||||
ImportLibrary=""
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
|
|
|
@ -108,7 +108,7 @@ switch_status sndfile_file_open(switch_file_handle *handle, char *path)
|
|||
}
|
||||
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Opening File [%s] %dhz\n", path, context->sfinfo.samplerate);
|
||||
handle->samples = context->sfinfo.frames;
|
||||
handle->samples = (unsigned int)context->sfinfo.frames;
|
||||
handle->samplerate = context->sfinfo.samplerate;
|
||||
handle->channels = context->sfinfo.channels;
|
||||
handle->format = context->sfinfo.format;
|
||||
|
@ -137,7 +137,7 @@ switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int *cur_sa
|
|||
return SWITCH_STATUS_NOTIMPL;
|
||||
}
|
||||
|
||||
*cur_sample = sf_seek(context->handle, samples, whence);
|
||||
*cur_sample = (unsigned int)sf_seek(context->handle, samples, whence);
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
||||
|
@ -145,21 +145,21 @@ switch_status sndfile_file_seek(switch_file_handle *handle, unsigned int *cur_sa
|
|||
|
||||
switch_status sndfile_file_read (switch_file_handle *handle, void *data, size_t *len)
|
||||
{
|
||||
unsigned int inlen = *len;
|
||||
size_t inlen = *len;
|
||||
sndfile_context *context = handle->private;
|
||||
|
||||
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
|
||||
*len = sf_read_raw (context->handle, data, inlen);
|
||||
*len = (size_t)sf_read_raw (context->handle, data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) {
|
||||
*len = sf_readf_int(context->handle, (int *) data, inlen);
|
||||
*len = (size_t)sf_readf_int(context->handle, (int *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) {
|
||||
*len = sf_readf_short(context->handle, (short *) data, inlen);
|
||||
*len = (size_t)sf_readf_short(context->handle, (short *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) {
|
||||
*len = sf_readf_float(context->handle, (float *) data, inlen);
|
||||
*len = (size_t)sf_readf_float(context->handle, (float *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) {
|
||||
*len = sf_readf_double(context->handle, (double *) data, inlen);
|
||||
*len = (size_t)sf_readf_double(context->handle, (double *) data, inlen);
|
||||
} else {
|
||||
*len = sf_readf_int(context->handle, (int *) data, inlen);
|
||||
*len = (size_t)sf_readf_int(context->handle, (int *) data, inlen);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
@ -167,21 +167,21 @@ switch_status sndfile_file_read (switch_file_handle *handle, void *data, size_t
|
|||
|
||||
switch_status sndfile_file_write (switch_file_handle *handle, void *data, size_t *len)
|
||||
{
|
||||
unsigned int inlen = *len;
|
||||
size_t inlen = *len;
|
||||
sndfile_context *context = handle->private;
|
||||
|
||||
if (switch_test_flag(handle, SWITCH_FILE_DATA_RAW)) {
|
||||
*len = sf_write_raw (context->handle, data, inlen);
|
||||
*len = (size_t)sf_write_raw (context->handle, data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_INT)) {
|
||||
*len = sf_writef_int(context->handle, (int *) data, inlen);
|
||||
*len = (size_t)sf_writef_int(context->handle, (int *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_SHORT)) {
|
||||
*len = sf_writef_short(context->handle, (short *) data, inlen);
|
||||
*len = (size_t)sf_writef_short(context->handle, (short *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_FLOAT)) {
|
||||
*len = sf_writef_float(context->handle, (float *) data, inlen);
|
||||
*len = (size_t)sf_writef_float(context->handle, (float *) data, inlen);
|
||||
} else if (switch_test_flag(handle, SWITCH_FILE_DATA_DOUBLE)) {
|
||||
*len = sf_writef_double(context->handle, (double *) data, inlen);
|
||||
*len = (size_t)sf_writef_double(context->handle, (double *) data, inlen);
|
||||
} else {
|
||||
*len = sf_writef_int(context->handle, (int *) data, inlen);
|
||||
*len = (size_t)sf_writef_int(context->handle, (int *) data, inlen);
|
||||
}
|
||||
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
|
|
|
@ -50,8 +50,8 @@ const struct switch_codec_settings default_codec_settings = {
|
|||
/*.pp_agc_level*/ 8000,
|
||||
/*.pp_denoise*/ 0,
|
||||
/*.pp_dereverb*/ 0,
|
||||
/*.pp_dereverb_decay*/ 0.4,
|
||||
/*.pp_dereverb_level*/ 0.3,
|
||||
/*.pp_dereverb_decay*/ 0.4f,
|
||||
/*.pp_dereverb_level*/ 0.3f,
|
||||
};
|
||||
|
||||
struct speex_context {
|
||||
|
@ -226,7 +226,7 @@ static switch_status switch_speex_decode(switch_codec *codec,
|
|||
if (*flag & SWITCH_CODEC_FLAG_SILENCE) {
|
||||
speex_decode_int(context->decoder_state, NULL, buf);
|
||||
} else {
|
||||
speex_bits_read_from(&context->decoder_bits, (char *)encoded_data, *decoded_data_len);
|
||||
speex_bits_read_from(&context->decoder_bits, (char *)encoded_data, (int)*decoded_data_len);
|
||||
speex_decode_int(context->decoder_state, &context->decoder_bits, buf);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue