Skip to content
Snippets Groups Projects
Commit 7c35f68e authored by Mark Spencer's avatar Mark Spencer
Browse files

Fix milliwatt and musiconhold to know about delivery times

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 79668f06
No related branches found
No related tags found
No related merge requests found
......@@ -76,6 +76,8 @@ static int milliwatt_generate(struct ast_channel *chan, void *data, int len, int
wf.datalen = len;
wf.samples = wf.datalen;
wf.src = "app_milliwatt";
wf.delivery.tv_sec = 0;
wf.delivery.tv_usec = 0;
/* create a buffer containing the digital milliwatt pattern */
for(i = 0; i < len; i++)
{
......
......@@ -123,6 +123,8 @@ static int playtones_generator(struct ast_channel *chan, void *data, int len, in
ps->f.samples = samples;
ps->f.offset = AST_FRIENDLY_OFFSET;
ps->f.data = ps->data;
ps->f.delivery.tv_sec = 0;
ps->f.delivery.tv_usec = 0;
ast_write(chan, &ps->f);
ps->pos += x;
......
......@@ -461,6 +461,8 @@ static int moh_generate(struct ast_channel *chan, void *data, int len, int sampl
f.samples = res / 2;
f.data = buf + AST_FRIENDLY_OFFSET / 2;
f.offset = AST_FRIENDLY_OFFSET;
f.delivery.tv_sec = 0;
f.delivery.tv_usec = 0;
if (ast_write(chan, &f)< 0) {
ast_log(LOG_WARNING, "Failed to write frame to '%s': %s\n", chan->name, strerror(errno));
return -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment