mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-05-02 14:48:22 +00:00
fix windows build
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11235 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
6f8e06f087
commit
d13f8c3efa
@ -1769,14 +1769,13 @@ SWITCH_STANDARD_API(pa_cmd)
|
|||||||
globals.ringdev = devval;
|
globals.ringdev = devval;
|
||||||
}
|
}
|
||||||
} else if ((argv[1] && !strcasecmp(argv[0], "play")) || !strcasecmp(argv[0], "ringtest")) {
|
} 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) {
|
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");
|
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;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch_file_handle_t fh = { 0 };
|
|
||||||
char *playfile = NULL;
|
|
||||||
|
|
||||||
if (!strcasecmp(argv[0], "ringtest")) {
|
if (!strcasecmp(argv[0], "ringtest")) {
|
||||||
playfile = globals.ring_file;
|
playfile = globals.ring_file;
|
||||||
} else {
|
} else {
|
||||||
@ -1816,7 +1815,8 @@ SWITCH_STANDARD_API(pa_cmd)
|
|||||||
if (engage_device(globals.sample_rate, globals.codec_ms) == SWITCH_STATUS_SUCCESS) {
|
if (engage_device(globals.sample_rate, globals.codec_ms) == SWITCH_STATUS_SUCCESS) {
|
||||||
int samples = 0;
|
int samples = 0;
|
||||||
int success = 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,
|
if ((samples = ReadAudioStream(globals.audio_stream, globals.read_frame.data,
|
||||||
globals.read_codec.implementation->samples_per_packet, &globals.timer))) {
|
globals.read_codec.implementation->samples_per_packet, &globals.timer))) {
|
||||||
WriteAudioStream(globals.audio_stream, globals.read_frame.data, (long) samples, &globals.timer);
|
WriteAudioStream(globals.audio_stream, globals.read_frame.data, (long) samples, &globals.timer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user