Commit Graph

375 Commits

Author SHA1 Message Date
Tilghman Lesher
9383d00d1c Merged revisions 251475 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r251475 | tilghman | 2010-03-09 14:30:03 -0600 (Tue, 09 Mar 2010) | 8 lines
  
  Build system modifications to ensure that Asterisk properly builds on Mac OS X 10.6.
  
  (closes issue #16997)
   Reported by: jquinn
   Patches: 
         20100309__issue16997__2.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman, russell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@251487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-09 20:32:32 +00:00
Joshua Colp
ac9d8c2145 Merged revisions 229282 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r229282 | file | 2009-11-10 16:06:13 -0400 (Tue, 10 Nov 2009) | 15 lines
  
  Merged revisions 229281 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r229281 | file | 2009-11-10 16:03:14 -0400 (Tue, 10 Nov 2009) | 8 lines
    
    Remove broken support for direct transcoding between G.726 RFC3551 and G.726 AAL2.
    
    On some systems the translation core would actually consider g726aal2 -> g726 -> signed linear
    to be a quicker path then g726aal2 -> signed linear which exposed this problem.
    
    (closes issue #15504)
    Reported by: globalnetinc
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@229283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-10 20:07:53 +00:00
David Vossel
bb050d5df9 Merged revisions 228420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r228420 | dvossel | 2009-11-06 11:09:01 -0600 (Fri, 06 Nov 2009) | 19 lines
  
  Merged revisions 228418 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r228418 | dvossel | 2009-11-06 11:07:13 -0600 (Fri, 06 Nov 2009) | 13 lines
    
    fixes segfault in iLBC
    
    For reasons not yet known, it appears possible for an ast_frame
    to have a datalen greater than zero while the actual data is NULL
    during Packet Loss Concealment.  Most codecs don't support PLC so
    this doesn't affect them.  This patch catches the malformed frame
    and prevents the crash from occuring.  Additional efforts to determine
    why it is possible for a frame to look like this are still being
    investigated.
    
    (issue #16979)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@228423 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-11-06 17:10:42 +00:00
Russell Bryant
ffe8346471 Merged revisions 224932 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r224932 | russell | 2009-10-20 22:09:04 -0500 (Tue, 20 Oct 2009) | 12 lines
  
  Merged revisions 224931 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r224931 | russell | 2009-10-20 21:59:54 -0500 (Tue, 20 Oct 2009) | 5 lines
    
    Isolate frames returned from a DSP instance or codec translator.
    
    The reasoning for these changes are the same as what I wrote in the commit
    message for rev 222878.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@224933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-21 03:15:06 +00:00
Tilghman Lesher
2662264c44 AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@211551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:25:03 +00:00
David Brooks
fef52dce32 Merged revisions 209554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r209554 | dbrooks | 2009-07-30 11:07:05 -0500 (Thu, 30 Jul 2009) | 6 lines
  
  Fixes numerous spelling errors. Patch submitted by alecdavis.
  
  (closes issue #15595)
  Reported by: alecdavis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@209555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-30 16:16:31 +00:00
Kevin P. Fleming
69255bd210 Merged revisions 207680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r207680 | kpfleming | 2009-07-21 08:28:04 -0500 (Tue, 21 Jul 2009) | 18 lines
  
  Merged revisions 207647 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
    
    Ensure that user-provided CFLAGS and LDFLAGS are honored.
    
    This commit changes the build system so that user-provided flags (in ASTCFLAGS
    and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
    by the build system itself, so that the user can effectively override the
    build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
    be provided *either* in the environment before running 'make', or as variable
    assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
    is no longer necessary, so they are no longer documented, but are still supported
    so as not to break existing build systems that supply them when building Asterisk.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@207683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:39:44 +00:00
Sean Bright
d5a7745520 Merged revisions 206636 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r206636 | seanbright | 2009-07-15 12:00:24 -0400 (Wed, 15 Jul 2009) | 9 lines
  
  Merged revisions 206635 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r206635 | seanbright | 2009-07-15 11:57:51 -0400 (Wed, 15 Jul 2009) | 1 line
    
    Only print debug info in codec_dahdi if we are asking for it.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@206637 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-15 16:02:04 +00:00
David Vossel
986be7d2a2 Merged revisions 201678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r201678 | dvossel | 2009-06-18 11:37:42 -0500 (Thu, 18 Jun 2009) | 11 lines
  
  fixes some memory leaks and redundant conditions
  
  (closes issue #15269)
  Reported by: contactmayankjain
  Patches:
        patch.txt uploaded by contactmayankjain (license 740)
        memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
  Tested by: contactmayankjain, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@201682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:58:03 +00:00
Russell Bryant
26c5affb96 Merged revisions 194722 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r194722 | russell | 2009-05-15 12:59:08 -0500 (Fri, 15 May 2009) | 4 lines

Shuttle some bits around to address some gain issues with G.722.

(closes AST-209)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@194723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 18:04:52 +00:00
Russell Bryant
ef334aff5f Merged revisions 194718 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r194718 | russell | 2009-05-15 12:37:12 -0500 (Fri, 15 May 2009) | 2 lines

Further simplify codec_g722 build.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@194719 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 17:37:29 +00:00
Russell Bryant
7981c09ed2 Merged revisions 194714 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r194714 | russell | 2009-05-15 12:24:39 -0500 (Fri, 15 May 2009) | 2 lines

Actually force running make for g722.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@194715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-15 17:25:06 +00:00
Shaun Ruffell
5c5511cb65 Merged revisions 176760 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r176760 | sruffell | 2009-02-17 16:28:41 -0600 (Tue, 17 Feb 2009) | 10 lines
  
  Several changes to codec_dahdi to play nice with G723.
  
  This commit brings in the changes that were living out on the
  svn/asterisk/team/sruffell/asterisk-trunk-transcoder branch.  codec_dahdi.c now
  always uses signed linear as the simple codec so that a soft g729 codec will
  not end up being preferred to the hardware codec.  There are also changes to
  allow codec_dahdi.c to feed packets to the hardware in the native sample size of
  the codec.  This solves problems with choppy audio when using G723. 
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-18 00:15:13 +00:00
Shaun Ruffell
d9a8cc0be1 Backing out an improper merge from trunk.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176804 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 23:47:15 +00:00
Shaun Ruffell
1755f4d31f Merged revisions 176760 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r176760 | sruffell | 2009-02-17 16:28:41 -0600 (Tue, 17 Feb 2009) | 10 lines
  
  Several changes to codec_dahdi to play nice with G723.
  
  This commit brings in the changes that were living out on the
  svn/asterisk/team/sruffell/asterisk-trunk-transcoder branch.  codec_dahdi.c now
  always uses signed linear as the simple codec so that a soft g729 codec will
  not end up being preferred to the hardware codec.  There are also changes to
  allow codec_dahdi.c to feed packets to the hardware in the native sample size of
  the codec.  This solves problems with choppy audio when using G723. 
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@176803 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 23:36:59 +00:00
Kevin P. Fleming
ae3b28aa19 Merged revisions 157974 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r157974 | kpfleming | 2008-11-19 18:08:12 -0600 (Wed, 19 Nov 2008) | 13 lines
  
  Merged revisions 157859 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r157859 | kpfleming | 2008-11-19 15:34:47 -0600 (Wed, 19 Nov 2008) | 7 lines
    
    the gcc optimizer frequently finds broken code (use of uninitalized variables, unreachable code, etc.), which is good. however, developers usually compile with the optimizer turned off, because if they need to debug the resulting code, optimized code makes that process very difficult. this means that we get code changes committed that weren't adequately checked over for these sorts of problems.
    
    with this build system change, if (and only if) --enable-dev-mode was used and DONT_OPTIMIZE is turned on, when a source file is compiled it will actually be preprocessed (into a .i or .ii file), then compiled once with optimization (with the result sent to /dev/null) and again without optimization (but only if the first compile succeeded, of course).
    
    while making these changes, i did some cleanup work in Makefile.rules to move commonly-used combinations of flag variables into their own variables, to make the file easier to read and maintain
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@157976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 00:12:32 +00:00
Russell Bryant
08966a95de Merged revisions 140566 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r140566 | russell | 2008-09-02 10:11:53 -0500 (Tue, 02 Sep 2008) | 2 lines

Update instructions for getting libresample

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@140567 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-02 15:12:24 +00:00
Shaun Ruffell
5a59e03452 Fix bug where the samples were not accurate when in G723 mode, which would
cause the timestamp field of the RTP header to be invalid.



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@139155 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-20 20:12:38 +00:00
Shaun Ruffell
732659ef67 Removing code that was commented out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@136674 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 20:41:06 +00:00
Shaun Ruffell
7fbba1d580 Updated codec_dahdi to use the transcoder interface in the DAHDI.
(Issue: DAHDI-42)



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@136672 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 20:38:38 +00:00
Russell Bryant
5b266380e2 Merged revisions 132390 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r132390 | russell | 2008-07-21 09:47:41 -0500 (Mon, 21 Jul 2008) | 16 lines

Remove libresample from the Asterisk source tree.  It is now available in its
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/branches/1.6.0@132391 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 14:48:45 +00:00
Russell Bryant
bc50069f75 Merged revisions 132388 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r132388 | russell | 2008-07-21 08:51:05 -0500 (Mon, 21 Jul 2008) | 3 lines

Enable higher quality resampling, as it doesn't have a noticeable performance
impact on my machine ..

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@132389 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-21 13:52:04 +00:00
Brett Bryant
559bbfc457 Merged revisions 130129 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r130129 | bbryant | 2008-07-11 13:09:35 -0500 (Fri, 11 Jul 2008) | 8 lines

Janitor patch to change uses of sizeof to ARRAY_LEN

(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/branches/1.6.0@130130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11 18:14:27 +00:00
Kevin P. Fleming
0b30f14b33 Merged revisions 125138 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r125138 | kpfleming | 2008-06-25 18:05:28 -0500 (Wed, 25 Jun 2008) | 18 lines

Merged revisions 125132 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r125132 | kpfleming | 2008-06-25 17:21:30 -0500 (Wed, 25 Jun 2008) | 10 lines

allow tonezone to live in a different place than DAHDI/Zaptel, since dahdi-tools and dahdi-linux are now separate packages and can be installed in different places

don't include tonezone.h in dahdi_compat.h, because only a couple of modules need it

get app_rpt building again after the DAHDI changes

(closes issue #12911)
Reported by: tzafrir


........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@125146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-25 23:20:35 +00:00
Jeff Peeler
f089bbf663 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@123332 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 18:08:09 +00:00
Joshua Colp
0ed86b307e Merged revisions 115328 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r115328 | file | 2008-05-05 19:13:57 -0300 (Mon, 05 May 2008) | 10 lines

Merged revisions 115327 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r115327 | file | 2008-05-05 19:10:05 -0300 (Mon, 05 May 2008) | 2 lines

Make sure that either the main speex library contains preprocess functions or that speexdsp does. If both fail then speex stuff can not be built.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@115331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05 22:17:05 +00:00
Jason Parker
557219e0dc Merged revisions 111857 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r111857 | qwell | 2008-03-28 16:46:02 -0500 (Fri, 28 Mar 2008) | 20 lines

Merged revisions 111856 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r111856 | qwell | 2008-03-28 16:45:35 -0500 (Fri, 28 Mar 2008) | 12 lines

Allow gsm to compile correctly on x86 with gcc4 optimizations.

(closes issue #11243)
Reported by: whiskerp
Patches:
      11243-maybe-asm.diff uploaded by qwell (license 4)
Tested by: Seggy (IRC)

Note: While I did write this patch, I would not have found this if fossil
 had not reported and fixed issue #12253.  A huge thanks to him for helping
 to (indirectly) find the problem here.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@111858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-28 21:46:31 +00:00
Kevin P. Fleming
085ef90375 Merged revisions 110881 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r110881 | kpfleming | 2008-03-26 10:10:28 -0700 (Wed, 26 Mar 2008) | 18 lines

Merged revisions 110880 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r110880 | kpfleming | 2008-03-26 09:42:35 -0700 (Wed, 26 Mar 2008) | 10 lines

Merged revisions 110869 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r110869 | kpfleming | 2008-03-26 08:53:46 -0700 (Wed, 26 Mar 2008) | 2 lines

due to licensing restrictions, we cannot distribute the source code for iLBC encoding and decoding... so remove it, and add instructions on how the user can obtain it themselves

........

................

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@110882 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-26 17:15:06 +00:00
Jason Parker
57d3a27f1b Merged revisions 110475 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r110475 | qwell | 2008-03-21 09:36:17 -0500 (Fri, 21 Mar 2008) | 15 lines

Merged revisions 110474 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110474 | qwell | 2008-03-21 09:32:52 -0500 (Fri, 21 Mar 2008) | 7 lines

Don't attempt to do optimizations of gsm on mips platforms either.

(closes issue #12270)
Reported by: zandbelt
Patches:
      026-gsm-mips.patch uploaded by zandbelt (license 33)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@110476 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-21 14:36:43 +00:00
Russell Bryant
2adbae37a8 Merged revisions 110339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r110339 | russell | 2008-03-20 17:02:20 -0500 (Thu, 20 Mar 2008) | 3 lines

Use the correct buffer for g722tolin16_sample.  This shouldn't have caused any
problems, but Qwell noticed the typo here.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@110340 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 22:02:46 +00:00
Jason Parker
4f2ec37cbd Merged revisions 109651 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r109651 | qwell | 2008-03-18 14:24:15 -0500 (Tue, 18 Mar 2008) | 15 lines

Merged revisions 109648 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109648 | qwell | 2008-03-18 14:23:44 -0500 (Tue, 18 Mar 2008) | 7 lines

Allow codecs that use log2comp (g726) to compile correctly on x86 with gcc4 optimizations.

(closes issue #12253)
Reported by: fossil
Patches:
      log2comp.patch uploaded by fossil (license 140)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@109654 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 19:24:45 +00:00
Kevin P. Fleming
19ca2892c0 Merged revisions 107466 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r107466 | kpfleming | 2008-03-11 10:13:38 -0500 (Tue, 11 Mar 2008) | 10 lines

Merged revisions 107464 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r107464 | kpfleming | 2008-03-11 09:53:03 -0500 (Tue, 11 Mar 2008) | 2 lines

fix various other problems found by gcc 4.3

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@107467 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 15:13:54 +00:00
Russell Bryant
ccf90e8186 Merged revisions 106501 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r106501 | russell | 2008-03-06 18:24:58 -0600 (Thu, 06 Mar 2008) | 28 lines

Merge changes from team/russell/g722-sillyness ...

Fix a number of other places where the number of samples in a G722 frame was
not properly handled because of various reasons.

main/rtp.c:
 - When a G722 frame is read from the smoother, the number of samples in the
   frame must be divided by 2 before being sent out over the network.  Even
   though G722 is 16 kHz, an error in some previous spec has made it so that
   we have to list the number of samples such as if it was 8 kHz.

main/file.c:
 - When scheduling the next time to expect a frame, take into account that the
   format of the file we're reading from may not be 8 kHz.

codecs/codec_g722.c:
 - When converting from G722 to slinear, g722_decode() expects its samples
   parameter to be in the silly (real samples / 2) format.  Make it so.
 - When converting from slinear to G722, properly set the number of samples in
   the frame to be the number of bytes of output * 2.

formats/format_pcm.c:
 - This format module handles G722, among a number of other formats.  However,
   the read() and seek() functions did not account for the fact that G722 has
   2 samples per byte.

(closes issue #12130, reported by rickross, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@106502 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-07 00:25:48 +00:00
Joshua Colp
c692e1cacb Merged revisions 98951 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98951 | file | 2008-01-15 21:13:27 -0400 (Tue, 15 Jan 2008) | 4 lines

Add autoconf logic for speexdsp. Later versions use a separate library for some things so we need to use it if present in codec_speex.
(closes issue #11693)
Reported by: yzg

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-16 01:17:25 +00:00
Russell Bryant
4fb04cb58a Merged revisions 98943 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r98943 | russell | 2008-01-15 17:26:52 -0600 (Tue, 15 Jan 2008) | 25 lines

Commit a fix for some memory access errors pointed out by the valgrind2.txt
output on issue #11698.

The issue here is that it is possible for an instance of a translator to get
destroyed while the frame allocated as a part of the translator is still being
processed.  Specifically, this is possible anywhere between a call to ast_read()
and ast_frame_free(), which is _a lot_ of places in the code.  The reason this
happens is that the channel might get masqueraded during this time.  During a
masquerade, existing translation paths get destroyed.

So, this patch fixes the issue in an API and ABI compatible way.  (This one is
 for you, paravoid!)

It changes an int in ast_frame to be used as flag bits.  The 1 bit is still used
to indicate that the frame contains timing information.  Also, a second flag has
been added to indicate that the frame came from a translator.  When a frame with
this flag gets released and has this flag, a function is called in translate.c to
let it know that this frame is doing being processed.  At this point, the flag gets
cleared.  Also, if the translator was requested to be destroyed while its internal
frame still had this flag set, its destruction has been deffered until it finds out
that the frame is no longer being processed.

Admittedly, this feels like a hack.  But, it does fix the issue, and I was not able 
to think of a better solution ...

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98944 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:31:53 +00:00
Russell Bryant
7bc92eda05 Kevin noted that the thing that I _actually_ changed here was that I converted
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-11 19:05:24 +00:00
Russell Bryant
d1256bb8a6 Fix a bus error that happened when asterisk was built with optimizations on
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-11 18:48:07 +00:00
Russell Bryant
c67509e429 At one point during working on this module, I had the lin/lin16 versions of the
framein callbacks different.  However, they are now the same again, so remove
the duplicate code and use the same functions for the lin/lin16 versions.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 17:17:54 +00:00
Russell Bryant
9387f036d8 - Fix the last set of places where incorrect assumptions were made about the
sample length with g722.  It is _2_ samples per byte, not 1.  This was all
   over the place, and I believed it, and it is what caused me to take so long
   to figure out what was broken.
 - Update copyright information on codec_g722.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98081 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 03:37:19 +00:00
Russell Bryant
a2c08fe0f0 Fix various issues in codec_g722.
- The most common fix being made here is to fix all of the places where the
   number of output samples and output bytes gets updated in the translator
   state structure.
 - Fix a number of other places where the number of samples provided as an
   initialization value to a struct was incorrect.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97975 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 23:16:09 +00:00
Russell Bryant
0a5bfb9eb8 Fix the buffer_samples value. For signed linear, the number of samples needed
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-10 23:10:00 +00:00
Russell Bryant
0da0033675 Fix this so it doesn't force codec_g722 to get relinked every time
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:17:02 +00:00
Russell Bryant
cc11e9569d Ensure that libg722.a gets rebuilt if one of the files changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97650 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 00:11:02 +00:00
Kevin P. Fleming
c7ba18820e Merged revisions 97491 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97491 | kpfleming | 2008-01-09 11:21:14 -0600 (Wed, 09 Jan 2008) | 2 lines

report the same message whether Zaptel does not have transcoder support loaded or no transcoders were found

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97495 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-09 17:30:13 +00:00
Kevin P. Fleming
887103e83b and now just to keep the libresample party going... if the functions from 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-02 18:21:04 +00:00
Kevin P. Fleming
04a10c145b go back to including libresample in the main Asterisk binary, but this time 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-02 14:05:30 +00:00
Russell Bryant
78f4b28552 Instead of linking libresample into the main Asterisk binary, build it as
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-02 01:00:44 +00:00
Joshua Colp
d0944cde47 Fix building of codec_resample on platforms other then Cygwin. On everything else it actually gets built after codec_resample, so you can't exactly link it in since it doesn't exist.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95648 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-01 23:09:32 +00:00
Luigi Rizzo
e637f2c038 make codec_resample build on __CYGWIN__, and make it load on FreeBSD
(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
2008-01-01 22:21:39 +00:00
Russell Bryant
e0dfa91db8 Use float.h to fix the build on FreeBSD. Also, add some other platforms as
they are likely the same.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95550 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-31 22:41:39 +00:00