3 extern const char *status_item_list
[NUM_STAT_ITEMS
];
6 int para_open_audiod_pipe(char *cmd
)
8 int fds
[3] = {0, 1, 0};
10 return para_exec_cmdline_pid(&pid
, cmd
, fds
) > 0?
14 int read_audiod_pipe(int fd
, void (*line_handler
)(char *) )
16 static char buf
[STRINGSIZE
];
17 const ssize_t bufsize
= sizeof(buf
) - 1;
18 static ssize_t loaded
;
21 if (loaded
>= bufsize
)
23 ret
= read(fd
, buf
+ loaded
, bufsize
- loaded
);
27 loaded
= for_each_line(buf
, loaded
, line_handler
);