Fixed obvious bug that crashed any tone with silence periods.

git-svn-id: http://voip.null.ro/svn/yate@25 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2004-08-20 12:22:30 +00:00
parent dd216a868a
commit 1d90be021d
1 changed files with 7 additions and 3 deletions

View File

@ -159,9 +159,13 @@ void ToneSource::run()
if (tone != otone)
dpos = 1;
}
if (dpos > tone->data[0])
dpos = 1;
*d++ = tone->data[dpos];
if (tone->data) {
if (dpos > tone->data[0])
dpos = 1;
*d++ = tone->data[dpos];
}
else
*d++ = 0;
}
long long dly = tpos - Time::now();
if (dly > 0) {