I'm not sure why this is necessary, but if we don't sleep/yield for a moment here then we end up with the potential for lost audio data happening. Is it because we're sending audio data to FreeSWITCH faster than it's being sent over the channel. Is it because of audio data in spandsp getting overwritten? Whatever the case, this here seems to do the trick.

This commit is contained in:
Lee Howard 2022-06-07 21:04:50 -07:00
parent cd6cc31cdf
commit e2acd2eafe
1 changed files with 6 additions and 0 deletions

View File

@ -1279,6 +1279,12 @@ static void *SWITCH_THREAD_FUNC modem_thread(switch_thread_t *thread, void *obj)
continue; continue;
} }
/* I'm not sure why this is necessary, but if we don't sleep/yield for a moment here then we end up with
the potential for lost audio data happening. Is it because we're sending audio data to FreeSWITCH faster
than it's being sent over the channel. Is it because of audio data in spandsp getting overwritten?
Whatever the case, this here seems to do the trick. */
switch_yield(1000);
do { do {
#ifndef WIN32 #ifndef WIN32
r = read(modem->master, buf, 1); r = read(modem->master, buf, 1);