]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix milliwatt and musiconhold to know about delivery times
authorMark Spencer <markster@digium.com>
Sat, 20 Mar 2004 23:31:40 +0000 (23:31 +0000)
committerMark Spencer <markster@digium.com>
Sat, 20 Mar 2004 23:31:40 +0000 (23:31 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2508 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_milliwatt.c
indications.c
res/res_musiconhold.c

index a2f92dcf60a3fe29b847b594e75394bf7fcf6762..78f0604cec7f2681c1c349969c65358efe165d8d 100755 (executable)
@@ -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++)
        {
index fefec9153b2b69939e5a1442116c7363cf637fd7..1f8b555558a6d73ab5c7def81e840baf9bdb302b 100755 (executable)
@@ -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;
index 450442d4b06a77db76d35809b3df0d49c8454018..7d8918f037baca1f2b06e0dfd7e443d9e11db8b3 100755 (executable)
@@ -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;