[asterisk-dev] [Code Review] 3112: wideband streaming with res_musiconhold
wdoekes
reviewboard at asterisk.org
Mon Jan 20 08:57:19 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3112/
-----------------------------------------------------------
(Updated Jan. 20, 2014, 8:57 a.m.)
Status
------
This change has been marked as submitted.
Review request for Asterisk Developers.
Repository: Asterisk
Description
-------
When streaming mp3s or using a custom musiconhold app, selecting format=sln16 wasn't possible. The audio would become choppy and unbearable.
The cause is that the reader only feeds 8kHz of info to asterisk per second, while we require 16kHz.
Diffs
-----
/trunk/res/res_musiconhold.c 405210
Diff: https://reviewboard.asterisk.org/r/3112/diff/
Testing
-------
The basic class->format calculation worked on Asterisk 11 with the following scenario. I added a bit of documentation and it still compiles.
[default]
mode=custom
;application=/etc/asterisk/musiconhold.sh 8000
;format=slin
application=/etc/asterisk/musiconhold.sh 16000
format=slin16
#!/bin/sh
hz="$1"
test -z "$hz" && hz=8000
mp3toraw="/usr/bin/madplay -Q -o raw:- --mono -b 16 -R $hz -a -12 -"
cat my_audio_file.mp3 | $mp3toraw
Thanks,
wdoekes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140120/beffc50e/attachment.html>
More information about the asterisk-dev
mailing list