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

Version 0.3.0 from FTP

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent a0743662
No related branches found
No related tags found
No related merge requests found
...@@ -109,7 +109,7 @@ static int spawn_mp3(struct mohclass *class) ...@@ -109,7 +109,7 @@ static int spawn_mp3(struct mohclass *class)
{ {
int fds[2]; int fds[2];
int files; int files;
char fns[80][MAX_MP3S]; char fns[MAX_MP3S][80];
char *argv[MAX_MP3S + 50]; char *argv[MAX_MP3S + 50];
char xargs[256]; char xargs[256];
char *argptr; char *argptr;
...@@ -394,7 +394,7 @@ static void *moh_alloc(struct ast_channel *chan, void *params) ...@@ -394,7 +394,7 @@ static void *moh_alloc(struct ast_channel *chan, void *params)
return res; return res;
} }
static int moh_generate(struct ast_channel *chan, void *data, int len) static int moh_generate(struct ast_channel *chan, void *data, int len, int samples)
{ {
struct ast_frame f; struct ast_frame f;
struct mohdata *moh = data; struct mohdata *moh = data;
...@@ -416,7 +416,7 @@ static int moh_generate(struct ast_channel *chan, void *data, int len) ...@@ -416,7 +416,7 @@ static int moh_generate(struct ast_channel *chan, void *data, int len)
f.subclass = AST_FORMAT_SLINEAR; f.subclass = AST_FORMAT_SLINEAR;
f.mallocd = 0; f.mallocd = 0;
f.datalen = res; f.datalen = res;
f.timelen = res / 8; f.samples = res / 2;
f.data = buf + AST_FRIENDLY_OFFSET / 2; f.data = buf + AST_FRIENDLY_OFFSET / 2;
f.offset = AST_FRIENDLY_OFFSET; f.offset = AST_FRIENDLY_OFFSET;
if (ast_write(chan, &f)< 0) { if (ast_write(chan, &f)< 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment