|
| 1 | +/* The audioop module uses the code base in g777.c file of the Sox project. |
| 2 | + * Source: https://web.archive.org/web/19970716121258/http://www.spies.com/Sox/Archive/soxgamma.tar.gz |
| 3 | + * Programming the AdLib/Sound Blaster |
| 4 | + * FM Music Chips |
| 5 | + * Version 2.0 (24 Feb 1992) |
| 6 | + * |
| 7 | + * Copyright (c) 1991, 1992 by Jeffrey S. Lee |
| 8 | + * |
| 9 | + |
| 10 | + * |
| 11 | + * |
| 12 | + * |
| 13 | + * Warranty and Copyright Policy |
| 14 | + * |
| 15 | + * This document is provided on an "as-is" basis, and its author makes |
| 16 | + * no warranty or representation, express or implied, with respect to |
| 17 | + * its quality performance or fitness for a particular purpose. In no |
| 18 | + * event will the author of this document be liable for direct, indirect, |
| 19 | + * special, incidental, or consequential damages arising out of the use |
| 20 | + * or inability to use the information contained within. Use of this |
| 21 | + * document is at your own risk. |
| 22 | + * |
| 23 | + * This file may be used and copied freely so long as the applicable |
| 24 | + * copyright notices are retained, and no modifications are made to the |
| 25 | + * text of the document. No money shall be charged for its distribution |
| 26 | + * beyond reasonable shipping, handling and duplication costs, nor shall |
| 27 | + * proprietary changes be made to this document so that it cannot be |
| 28 | + * distributed freely. This document may not be included in published |
| 29 | + * material or commercial packages without the written consent of its |
| 30 | + * author. */ |
1 | 31 |
|
2 | 32 | /* audioopmodule - Module to detect peak values in arrays */
|
3 | 33 |
|
@@ -28,20 +58,6 @@ fbound(double val, double minval, double maxval)
|
28 | 58 | }
|
29 | 59 |
|
30 | 60 |
|
31 |
| -/* Code shamelessly stolen from sox, 12.17.7, g711.c |
32 |
| -** (c) Craig Reese, Joe Campbell and Jeff Poskanzer 1989 */ |
33 |
| - |
34 |
| -/* From g711.c: |
35 |
| - * |
36 |
| - * December 30, 1994: |
37 |
| - * Functions linear2alaw, linear2ulaw have been updated to correctly |
38 |
| - * convert unquantized 16 bit values. |
39 |
| - * Tables for direct u- to A-law and A- to u-law conversions have been |
40 |
| - * corrected. |
41 |
| - * Borge Lindberg, Center for PersonKommunikation, Aalborg University. |
42 |
| - |
43 |
| - * |
44 |
| - */ |
45 | 61 | #define BIAS 0x84 /* define the add-in bias for 16 bit samples */
|
46 | 62 | #define CLIP 32635
|
47 | 63 | #define SIGN_BIT (0x80) /* Sign bit for an A-law byte. */
|
|
0 commit comments