Oops
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1324 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
18ecda6b7d
commit
8c5e6b7b8c
|
@ -128,21 +128,13 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
|
||||||
int ms = -1;
|
int ms = -1;
|
||||||
int pid = -1;
|
int pid = -1;
|
||||||
int needed = 0;
|
int needed = 0;
|
||||||
int us;
|
|
||||||
int exception;
|
|
||||||
int owriteformat;
|
int owriteformat;
|
||||||
struct timeval tv;
|
|
||||||
struct timeval last;
|
|
||||||
struct ast_frame *f;
|
struct ast_frame *f;
|
||||||
int x;
|
|
||||||
struct ast_frame *winner;
|
|
||||||
struct myframe {
|
struct myframe {
|
||||||
struct ast_frame f;
|
struct ast_frame f;
|
||||||
char offset[AST_FRIENDLY_OFFSET];
|
char offset[AST_FRIENDLY_OFFSET];
|
||||||
char frdata[2048];
|
char frdata[2048];
|
||||||
} myf;
|
} myf;
|
||||||
last.tv_usec = 0;
|
|
||||||
last.tv_sec = 0;
|
|
||||||
|
|
||||||
if (pipe(fds)) {
|
if (pipe(fds)) {
|
||||||
ast_log(LOG_WARNING, "Unable to create pipe\n");
|
ast_log(LOG_WARNING, "Unable to create pipe\n");
|
||||||
|
@ -184,7 +176,7 @@ static int send_waveform_to_channel(struct ast_channel *chan, char *waveform, in
|
||||||
}
|
}
|
||||||
if (f->frametype == AST_FRAME_VOICE) {
|
if (f->frametype == AST_FRAME_VOICE) {
|
||||||
/* Treat as a generator */
|
/* Treat as a generator */
|
||||||
needed = f->sample * 2;
|
needed = f->samples * 2;
|
||||||
if (needed > sizeof(myf.frdata)) {
|
if (needed > sizeof(myf.frdata)) {
|
||||||
ast_log(LOG_WARNING, "Only able to deliver %d of %d requested samples\n",
|
ast_log(LOG_WARNING, "Only able to deliver %d of %d requested samples\n",
|
||||||
sizeof(myf.frdata) / 2, needed/2);
|
sizeof(myf.frdata) / 2, needed/2);
|
||||||
|
|
Reference in New Issue