add interval to file handles for streams

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6473 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale committed 2007-12-02 16:01:56 +00:00
1 parent 701feee9a1
commit b093ec1e53
3 files changed
+9 -3

No files matched your search

+6 -2
View File
@@ -1123,6 +1123,7 @@ void do_broadcast(switch_stream_handle_t *stream)
uint8_t buf[1024];
int rlen;
int is_local = 0;
uint32_t interval = 20000;
if (strstr(path_info + 7, "://")) {
file = strdup(path_info + 7);
@@ -1171,14 +1172,17 @@ void do_broadcast(switch_stream_handle_t *stream)
path_info + 7);
if (fh.interval) {
interval = fh.interval;
}
for(;;) {
switch_size_t samples = sizeof(buf) / 2;
switch_core_file_read(&fh, buf, &samples);
if (is_local) {
switch_yield(20000);
switch_yield(interval);
}
if (!samples) {