summaryrefslogtreecommitdiff
path: root/codecs/codec_resample.c
AgeCommit message (Collapse)Author
2011-08-05Merged revisions 330940 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/10 ........ r330940 | dvossel | 2011-08-05 10:53:49 -0500 (Fri, 05 Aug 2011) | 2 lines The slin resampler is no longer dependent on an external library, but the dependency was not removed correctly. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@330941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-04-20Fixes error with frame datalen being calculated from samples when this is ↵David Vossel
not allwaya accurate. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@314415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-03-18Remove libresample dependency from codec_resample.cDavid Vossel
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@311385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-22Media Project Phase2: SILK 8khz-24khz, SLINEAR 8khz-192khz, SPEEX 32khz, hd ↵David Vossel
audio ConfBridge, and other stuff -Functional changes 1. Dynamic global format list build by codecs defined in codecs.conf 2. SILK 8khz, 12khz, 16khz, and 24khz with custom attributes defined in codecs.conf 3. Negotiation of SILK attributes in chan_sip. 4. SPEEX 32khz with translation 5. SLINEAR 8khz, 12khz, 24khz, 32khz, 44.1khz, 48khz, 96khz, 192khz with translation using codec_resample.c 6. Various changes to RTP code required to properly handle the dynamic format list and formats with attributes. 7. ConfBridge now dynamically jumps to the best possible sample rate. This allows for conferences to take advantage of HD audio (Which sounds awesome) 8. Audiohooks are no longer limited to 8khz audio, and most effects have been updated to take advantage of this such as Volume, DENOISE, PITCH_SHIFT. 9. codec_resample now uses its own code rather than depending on libresample. -Organizational changes Global format list is moved from frame.c to format.c Various format specific functions moved from frame.c to format.c Review: https://reviewboard.asterisk.org/r/1104/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@308582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-03Asterisk media architecture conversion - no more format bitfieldsDavid Vossel
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-17Merge codec_consistency branch. This should make sample usage much happier.Jason Parker
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@150729 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02Update instructions for getting libresampleRussell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21Remove libresample from the Asterisk source tree. It is now available in itsRussell Bryant
own repository, and must be installed like any other library for Asterisk to use. The two modules that require it are codec_resample and app_jack. To install libresample: $ svn co http://svn.digium.com/svn/libresample/trunk libresample $ cd libresample $ ./configure $ make $ sudo make install This code is currently in our own repository because the build system did not include the appropriate targets for building a dynamic library or for installing the library. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21Enable higher quality resampling, as it doesn't have a noticeable performanceRussell Bryant
impact on my machine .. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@132388 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Janitor patch to change uses of sizeof to ARRAY_LENBrett Bryant
(closes issue #13054) Reported by: pabelanger Patches: ARRAY_LEN.patch2 uploaded by pabelanger (license 224) Tested by: seanbright git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-26Convert casts to unions, to fix alignment issues on SolarisTilghman Lesher
(closes issue #12932) Reported by: snuffy Patches: bug_12932_20080627.diff uploaded by snuffy (license 35) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@125386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-22- revert change to ast_queue_hangup and create ast_queue_hangup_with_causeMichiel van Baak
- make data member of the ast_frame struct a named union instead of a void Recently the ast_queue_hangup function got a new parameter, the hangupcause Feedback came in that this is no good and that instead a new function should be created. This I did. The hangupcause was stored in the seqno member of the ast_frame struct. This is not very elegant, and since there's already a data member that one should be used. Problem is, this member was a void *. Now it's a named union so it can hold a pointer, an uint32 and there's a padding in case someone wants to store another type in there in the future. This commit is so massive, because all ast_frame.data uses have to be altered to ast_frame.data.data Thanks russellb and kpfleming for the feedback. (closes issue #12674) Reported by: mvanbaak git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11Kevin noted that the thing that I _actually_ changed here was that I convertedRussell Bryant
a value from a double, to a float, back to a double. Sure enough, when I changed my interim variable back to a double, it still blows up. Switching all of these to a float fixes the problem. This seems like a compiler bug where a double passed as an argument isn't getting properly aligned, so I'll have to see if I can replicate it with a small test program. (related to issue #11725) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98308 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11Fix a bus error that happened when asterisk was built with optimizations on Russell Bryant
with platforms that explode on unaligned access. I'm not exactly sure why this fixes it, but it fixed it on the machine I was testing on. If it makes sense to you, feel free to enlighten me. :) (closes issue #11725, patched by me) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10Fix the buffer_samples value. For signed linear, the number of samples neededRussell Bryant
to fill the buffer is half the buffer size. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97974 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02and now just to keep the libresample party going... if the functions from ↵Kevin P. Fleming
libresample are going to be in the main Asterisk binary, it makes sense for the header that defines them to be available without any special CFLAGS and to out-of-tree modules building against /usr/include/asterisk git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95894 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02go back to including libresample in the main Asterisk binary, but this time ↵Kevin P. Fleming
including a small hack to ensure that it does get linked in (and also modify the strip_nonapi script to leave the resample_<foo> symbols alone) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02Instead of linking libresample into the main Asterisk binary, build it asRussell Bryant
res_resample, and mark codec_resample as dependent upon res_resample. This prevents the linker from optimizing away libresample, and also makes it so the libresample code isn't linked in to multiple places. (I have another module in a branch that needs it, too.) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95697 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-01make codec_resample build on __CYGWIN__, and make it load on FreeBSDLuigi Rizzo
(and probably other systems as well). Both need libresample.a to be specified in the linking phase, and cygwin needs <float.h> as other BSD. The checks for OS-specific headers should really be moved to some common header though. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95625 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31Use float.h to fix the build on FreeBSD. Also, add some other platforms asRussell Bryant
they are likely the same. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31Merge changes from team/russell/codec_resampleRussell Bryant
This commit imports libresample for use in Asterisk. It also adds a new codec module, codec_resample. This module uses libresample to re-sample signed linear audio between 8 kHz and 16 kHz. It also provides an alternative for converting between 16 kHz G.722 and 8 kHz signed linear when using G.722, which will likely be useful as some people have complained about volume issues when the current codec_g722 converts to 8 kHz signed linear. But, to test this, you will have to disable the g722-to-slin and g722-to-slin16 translators in codec_g722.c. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95501 65c4cc65-6c06-0410-ace0-fbb531ad65f3