mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 07:48:14 +00:00
Merge BKW's mp3 improvements
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2867 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -61,21 +61,21 @@ static int mp3play(char *filename, int fd)
|
|||||||
close(x);
|
close(x);
|
||||||
}
|
}
|
||||||
/* Execute mpg123, but buffer if it's a net connection */
|
/* Execute mpg123, but buffer if it's a net connection */
|
||||||
if (strncmp(filename, "http://", 7)) {
|
if (!strncmp(filename, "http://", 7)) {
|
||||||
/* Most commonly installed in /usr/local/bin */
|
/* Most commonly installed in /usr/local/bin */
|
||||||
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
|
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
/* But many places has it in /usr/bin */
|
/* But many places has it in /usr/bin */
|
||||||
execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
|
execl(MPG_123, "mpg123", "-q", "-s", "-b", "1024","-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
/* As a last-ditch effort, try to use PATH */
|
/* As a last-ditch effort, try to use PATH */
|
||||||
execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "--mono", "-r", "8000", filename, (char *)NULL);
|
execlp("mpg123", "mpg123", "-q", "-s", "-b", "1024", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* Most commonly installed in /usr/local/bin */
|
/* Most commonly installed in /usr/local/bin */
|
||||||
execl(MPG_123, "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
|
execl(MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
/* But many places has it in /usr/bin */
|
/* But many places has it in /usr/bin */
|
||||||
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
|
execl(LOCAL_MPG_123, "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
/* As a last-ditch effort, try to use PATH */
|
/* As a last-ditch effort, try to use PATH */
|
||||||
execlp("mpg123", "mpg123", "-q", "-s", "--mono", "-r", "8000", filename, (char *)NULL);
|
execlp("mpg123", "mpg123", "-q", "-s", "-f", "8192", "--mono", "-r", "8000", filename, (char *)NULL);
|
||||||
}
|
}
|
||||||
ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
|
ast_log(LOG_WARNING, "Execute of mpg123 failed\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user