[asterisk-bugs] [Asterisk 0017267]: [patch] audiohook: translation to slinear 8khz regardless of samplerate

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Sep 13 12:55:41 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17267 
====================================================================== 
Reported By:                ssester
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   17267
Category:                   Core/General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     confirmed
Asterisk Version:           SVN 
JIRA:                       SWP-1398 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 258676 
Request Review:              
====================================================================== 
Date Submitted:             2010-04-30 07:17 CDT
Last Modified:              2010-09-13 12:55 CDT
====================================================================== 
Summary:                    [patch] audiohook: translation to slinear 8khz
regardless of samplerate
Description: 
If an audiohook is attached to a channel that uses a codec with a
samplerate of 16khz (e.g. G722) the frames are always downgraded to 8khz
16bit signed linear. So if we have 16khz G722 with 320 samples, that will
be downgraded to 160 samples.

The expected behaviour would be to translate the frames to 16khz 16bit
signed linear (SLINEAR16) with 320 samples.
====================================================================== 

---------------------------------------------------------------------- 
 (0126899) dvossel (administrator) - 2010-09-13 12:55
 https://issues.asterisk.org/view.php?id=17267#c126899 
---------------------------------------------------------------------- 
I've briefly looked over the new patch and have a few comments about the
direction it is taking.

It does appear to address the problem I mentioned earlier about being
about to configure if 16khz is wanted or not, but the way it is done feels
rather limiting.  If we are going to take the time to expand audiohooks
from 8khz, it should be done in a way that is completely scalable, meaning
nothing in the code hard codes checks for 16khz.  Instead of passing a flag
to the init function telling it we what 16khz audio, we should be able to
pass a number representing the sample rate we want.  Then internally the
code should be written in a way that allows any sample rate Asterisk is
capable of producing to be acceptable.  Doing it this way would allow us do
have 64khz audiohooks for free once 64khz audio is supported, which isn't
far off. We already have support for 32khz audio. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-09-13 12:55 dvossel        Note Added: 0126899                          
======================================================================




More information about the asterisk-bugs mailing list