Neal Horman <neal at wanlink dot com> - conference improvements, switch_ivr menu additions and other tweaks.\r
Johny Kadarisman <jkr888 at gmail.com> - mod_python fixups.\r
Michael Murdock <mike at mmurdock dot org> - testing, documentation, bug finding and usability enhancements.\r
-\r
+ Matt Klein <mklein@nmedia.net>\r
\r
A big THANK YOU goes to:\r
\r
* Anthony Minessale II <anthmct@yahoo.com>
* Paul D. Tinsley <pdt at jackhammer.org>
* Neal Horman <neal at wanlink dot com>
+ * Matt Klein <mklein@nmedia.net>
*
* switch_ivr_api.c -- IVR Library
*
switch_channel_t *channel;
int16_t abuf[FILE_STARTSAMPLES];
char dtmf[128];
- uint32_t interval = 0, samples = 0, framelen;
+ uint32_t interval = 0, samples = 0, framelen, sample_start = 0;
uint32_t ilen = 0;
switch_size_t olen = 0;
switch_frame_t write_frame = {0};
uint8_t asis = 0;
char *ext;
+ if (fh->samples > 0) {
+ sample_start = fh->samples;
+ fh->samples = 0;
+ }
+
if (file) {
if ((ext = strrchr(file, '.'))) {
ext++;
write_frame.data = abuf;
write_frame.buflen = sizeof(abuf);
- if (fh->samples) {
+ if (sample_start > 0) {
uint32_t pos = 0;
- switch_core_file_seek(fh, &pos, fh->samples, SEEK_CUR);
+ switch_core_file_seek(fh, &pos, sample_start, SEEK_CUR);
}
if (switch_core_file_get_string(fh, SWITCH_AUDIO_COL_STR_TITLE, &p) == SWITCH_STATUS_SUCCESS) {