[commit] r11235 - freeswitch/trunk/src/mod/endpoints/mod_portaudio
Author: mikej Date: Thu Jan 15 16:50:50 2009 New Revision: 11235 Log: fix windows build Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c Thu Jan 15 16:50:50 2009 @@ -1769,14 +1769,13 @@ globals.ringdev = devval; } } else if ((argv[1] && !strcasecmp(argv[0], "play")) || !strcasecmp(argv[0], "ringtest")) { + switch_file_handle_t fh = { 0 }; + char *playfile = NULL; if (globals.audio_stream) { switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_INFO, "ERROR: Cannot use this command this while a call is in progress\n"); goto done; } - switch_file_handle_t fh = { 0 }; - char *playfile = NULL; - if (!strcasecmp(argv[0], "ringtest")) { playfile = globals.ring_file; } else { @@ -1816,7 +1815,8 @@ if (engage_device(globals.sample_rate, globals.codec_ms) == SWITCH_STATUS_SUCCESS) { int samples = 0; int success = 0; - for(int i = 0; i < 400; i++) { + int i; + for(i = 0; i < 400; i++) { if ((samples = ReadAudioStream(globals.audio_stream, globals.read_frame.data, globals.read_codec.implementation->samples_per_packet, &globals.timer))) { WriteAudioStream(globals.audio_stream, globals.read_frame.data, (long) samples, &globals.timer);
participants (1)
-
FreeSWITCH SVN