fix msvc warnings. fix high priority on windows.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@695 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d2ca6983ac
commit
4363c224f5
|
@ -769,7 +769,7 @@ SWITCH_DECLARE(switch_status) switch_core_file_close(switch_file_handle *fh);
|
|||
SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
|
||||
char *module_name,
|
||||
char *voice_name,
|
||||
int rate,
|
||||
unsigned int rate,
|
||||
switch_speech_flag flags,
|
||||
switch_memory_pool *pool);
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
|
|||
char *tts_name,
|
||||
char *voice_name,
|
||||
char *timer_name,
|
||||
size_t rate,
|
||||
unsigned int rate,
|
||||
switch_dtmf_callback_function dtmf_callback,
|
||||
char *text,
|
||||
void *buf,
|
||||
|
|
|
@ -291,7 +291,7 @@ struct switch_speech_interface {
|
|||
/*! function to open the speech interface */
|
||||
switch_status (*speech_open)(switch_speech_handle *sh,
|
||||
char *voice_name,
|
||||
int rate,
|
||||
unsigned int rate,
|
||||
switch_speech_flag flags);
|
||||
/*! function to close the speech interface */
|
||||
switch_status (*speech_close)(switch_speech_handle *, switch_speech_flag *flags);
|
||||
|
|
|
@ -75,7 +75,7 @@ static swift_result_t write_audio(swift_event *event, swift_event_t type, void *
|
|||
return rv;
|
||||
}
|
||||
|
||||
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, int rate, switch_speech_flag flags)
|
||||
static switch_status cepstral_speech_open(switch_speech_handle *sh, char *voice_name, unsigned int rate, switch_speech_flag flags)
|
||||
{
|
||||
if (flags & SWITCH_SPEECH_FLAG_ASR) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
|
|
|
@ -78,7 +78,7 @@ static JSClass global_class = {
|
|||
struct dtmf_callback_state {
|
||||
struct js_session *session_state;
|
||||
char code_buffer[1024];
|
||||
int code_buffer_len;
|
||||
size_t code_buffer_len;
|
||||
char ret_buffer[1024];
|
||||
int ret_buffer_len;
|
||||
int digit_count;
|
||||
|
@ -198,9 +198,9 @@ static switch_status js_dtmf_callback(switch_core_session *session, char *dtmf,
|
|||
|
||||
if (*ret == '+' || *ret == '-') {
|
||||
switch_codec *codec;
|
||||
codec = switch_core_session_get_read_codec(jss->session);
|
||||
unsigned int samps = 0;
|
||||
unsigned int pos = 0;
|
||||
codec = switch_core_session_get_read_codec(jss->session);
|
||||
if (*ret == '+') {
|
||||
ret++;
|
||||
samps = atoi(ret) * (codec->implementation->samples_per_second / 1000);
|
||||
|
|
|
@ -77,6 +77,7 @@ int main(int argc, char *argv[])
|
|||
FILE *f;
|
||||
#ifdef WIN32
|
||||
char sep = '\\';
|
||||
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
||||
#else
|
||||
char sep = '/';
|
||||
int pid;
|
||||
|
|
|
@ -476,7 +476,7 @@ SWITCH_DECLARE(switch_status) switch_core_directory_close(switch_directory_handl
|
|||
SWITCH_DECLARE(switch_status) switch_core_speech_open(switch_speech_handle *sh,
|
||||
char *module_name,
|
||||
char *voice_name,
|
||||
int rate,
|
||||
unsigned int rate,
|
||||
switch_speech_flag flags,
|
||||
switch_memory_pool *pool)
|
||||
{
|
||||
|
|
|
@ -364,10 +364,10 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
|||
|
||||
|
||||
if (fh->speed && do_speed) {
|
||||
float factor = 0.25 * abs(fh->speed);
|
||||
unsigned int newlen, supplement, step;
|
||||
float factor = 0.25f * abs(fh->speed);
|
||||
size_t newlen, supplement, step;
|
||||
short *bp = write_frame.data;
|
||||
int wrote = 0;
|
||||
size_t wrote = 0;
|
||||
|
||||
if (!fh->audio_buffer) {
|
||||
switch_buffer_create(fh->memory_pool, &fh->audio_buffer, SWITCH_RECCOMMENDED_BUFFER_SIZE);
|
||||
|
@ -386,7 +386,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
|||
} else {
|
||||
float f;
|
||||
short s;
|
||||
f = *bp + *(bp+1) + *(bp-1);
|
||||
f = (float)(*bp + *(bp+1) + *(bp-1));
|
||||
f /= 3;
|
||||
s = (short) f;
|
||||
switch_buffer_write(fh->audio_buffer, &s, 2);
|
||||
|
@ -394,7 +394,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_play_file(switch_core_session *session,
|
|||
}
|
||||
}
|
||||
if (wrote < newlen) {
|
||||
unsigned int r = newlen - wrote;
|
||||
size_t r = newlen - wrote;
|
||||
switch_buffer_write(fh->audio_buffer, bp, r*2);
|
||||
wrote += r;
|
||||
}
|
||||
|
@ -452,7 +452,7 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
|
|||
char *tts_name,
|
||||
char *voice_name,
|
||||
char *timer_name,
|
||||
size_t rate,
|
||||
unsigned int rate,
|
||||
switch_dtmf_callback_function dtmf_callback,
|
||||
char *text,
|
||||
void *buf,
|
||||
|
@ -461,7 +461,8 @@ SWITCH_DECLARE(switch_status) switch_ivr_speak_text(switch_core_session *session
|
|||
switch_channel *channel;
|
||||
short abuf[960];
|
||||
char dtmf[128];
|
||||
int interval = 0, samples = 0;
|
||||
int interval = 0;
|
||||
unsigned int samples = 0;
|
||||
size_t len = 0;
|
||||
size_t ilen = 0;
|
||||
switch_frame write_frame;
|
||||
|
|
|
@ -100,7 +100,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y
if not exist $(Outdir)\db md $(Outdir)\db
"
|
||||
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y
if not exist $(Outdir)\db md $(Outdir)\db
if not exist $(Outdir)\log md $(Outdir)\log
"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
|
@ -183,7 +183,7 @@
|
|||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y
if not exist $(Outdir)\db md $(Outdir)\db
"
|
||||
CommandLine="xcopy $(Projectdir)..\..\conf\*.* $(Outdir)\conf\ /C /D /Y
if not exist $(Outdir)\db md $(Outdir)\db
if not exist $(Outdir)\log md $(Outdir)\log
"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
|
|
Loading…
Reference in New Issue