[asterisk-dev] [Code Review] 3112: wideband streaming with res_musiconhold
Matt Jordan
reviewboard at asterisk.org
Thu Jan 9 10:36:05 CST 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3112/#review10534
-----------------------------------------------------------
Ship it!
Might want to make a note in the CHANGES file that MoH will now support wide band audio. Nice work!
- Matt Jordan
On Jan. 9, 2014, 8:50 a.m., wdoekes wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3112/
> -----------------------------------------------------------
>
> (Updated Jan. 9, 2014, 8:50 a.m.)
>
>
> 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/20140109/fe04ba3b/attachment.html>
More information about the asterisk-dev
mailing list