mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
Various updates to spandsp tests
spandsp logging now passes an opaque pointer to the logging routine, to increase flexibility. Right now the pointer is set to NULL in all calls.
This commit is contained in:
@@ -42,146 +42,274 @@
|
||||
#include "spandsp/complex.h"
|
||||
#include "spandsp/dds.h"
|
||||
|
||||
/* In a A-law or u-law channel, a 128 step sine table is adequate to keep the spectral
|
||||
/* In a A-law or u-law channel, a fairly coarse step sine table is adequate to keep the spectral
|
||||
mess due to the DDS at a similar level to the spectral mess due to the A-law or u-law
|
||||
compression. */
|
||||
#define SLENK 7
|
||||
#define SLENK 8
|
||||
#define DDS_STEPS (1 << SLENK)
|
||||
#define DDS_SHIFT (32 - 2 - SLENK)
|
||||
|
||||
/* This is a simple set of direct digital synthesis (DDS) functions to generate sine
|
||||
waves. This version uses a 128 entry sin/cos table to cover one quadrant. */
|
||||
waves. This version uses a 256 entry sin/cos table to cover one quadrant. */
|
||||
|
||||
static const int16_t sine_table[DDS_STEPS + 1] =
|
||||
{
|
||||
0,
|
||||
201,
|
||||
402,
|
||||
603,
|
||||
804,
|
||||
1005,
|
||||
1206,
|
||||
1407,
|
||||
1608,
|
||||
1809,
|
||||
2009,
|
||||
2210,
|
||||
2410,
|
||||
2611,
|
||||
2811,
|
||||
3012,
|
||||
3212,
|
||||
3412,
|
||||
3812,
|
||||
4211,
|
||||
3612,
|
||||
3811,
|
||||
4011,
|
||||
4210,
|
||||
4410,
|
||||
4609,
|
||||
4808,
|
||||
5007,
|
||||
5205,
|
||||
5404,
|
||||
5602,
|
||||
5800,
|
||||
5998,
|
||||
6195,
|
||||
6393,
|
||||
6590,
|
||||
6786,
|
||||
6983,
|
||||
7376,
|
||||
7179,
|
||||
7375,
|
||||
7571,
|
||||
7767,
|
||||
7962,
|
||||
8157,
|
||||
8546,
|
||||
8351,
|
||||
8545,
|
||||
8739,
|
||||
8933,
|
||||
9126,
|
||||
9319,
|
||||
9512,
|
||||
9704,
|
||||
10088,
|
||||
9896,
|
||||
10087,
|
||||
10278,
|
||||
10469,
|
||||
10850,
|
||||
10659,
|
||||
10849,
|
||||
11039,
|
||||
11228,
|
||||
11417,
|
||||
11605,
|
||||
11793,
|
||||
11980,
|
||||
12354,
|
||||
12167,
|
||||
12353,
|
||||
12539,
|
||||
12725,
|
||||
13095,
|
||||
13463,
|
||||
12910,
|
||||
13094,
|
||||
13279,
|
||||
13462,
|
||||
13645,
|
||||
13828,
|
||||
14192,
|
||||
14010,
|
||||
14191,
|
||||
14372,
|
||||
14553,
|
||||
14732,
|
||||
14912,
|
||||
15090,
|
||||
15269,
|
||||
15624,
|
||||
15446,
|
||||
15623,
|
||||
15800,
|
||||
15976,
|
||||
16326,
|
||||
16151,
|
||||
16325,
|
||||
16499,
|
||||
16673,
|
||||
16846,
|
||||
17018,
|
||||
17361,
|
||||
17189,
|
||||
17360,
|
||||
17530,
|
||||
17700,
|
||||
17869,
|
||||
18037,
|
||||
18372,
|
||||
18204,
|
||||
18371,
|
||||
18537,
|
||||
18703,
|
||||
18868,
|
||||
19032,
|
||||
19358,
|
||||
19681,
|
||||
20001,
|
||||
20318,
|
||||
20632,
|
||||
20943,
|
||||
21251,
|
||||
21555,
|
||||
19195,
|
||||
19357,
|
||||
19519,
|
||||
19680,
|
||||
19841,
|
||||
20000,
|
||||
20159,
|
||||
20317,
|
||||
20475,
|
||||
20631,
|
||||
20787,
|
||||
20942,
|
||||
21096,
|
||||
21250,
|
||||
21403,
|
||||
21554,
|
||||
21705,
|
||||
21856,
|
||||
22005,
|
||||
22154,
|
||||
22449,
|
||||
22740,
|
||||
23028,
|
||||
23312,
|
||||
23593,
|
||||
22301,
|
||||
22448,
|
||||
22594,
|
||||
22739,
|
||||
22884,
|
||||
23027,
|
||||
23170,
|
||||
23311,
|
||||
23452,
|
||||
23592,
|
||||
23731,
|
||||
23870,
|
||||
24144,
|
||||
24414,
|
||||
24007,
|
||||
24143,
|
||||
24279,
|
||||
24413,
|
||||
24547,
|
||||
24680,
|
||||
24943,
|
||||
25202,
|
||||
25457,
|
||||
24811,
|
||||
24942,
|
||||
25072,
|
||||
25201,
|
||||
25329,
|
||||
25456,
|
||||
25582,
|
||||
25708,
|
||||
25956,
|
||||
26199,
|
||||
26439,
|
||||
25832,
|
||||
25955,
|
||||
26077,
|
||||
26198,
|
||||
26319,
|
||||
26438,
|
||||
26556,
|
||||
26674,
|
||||
26906,
|
||||
26790,
|
||||
26905,
|
||||
27019,
|
||||
27133,
|
||||
27357,
|
||||
27576,
|
||||
27791,
|
||||
28002,
|
||||
28209,
|
||||
27245,
|
||||
27356,
|
||||
27466,
|
||||
27575,
|
||||
27683,
|
||||
27790,
|
||||
27896,
|
||||
28001,
|
||||
28105,
|
||||
28208,
|
||||
28310,
|
||||
28411,
|
||||
28610,
|
||||
28510,
|
||||
28609,
|
||||
28706,
|
||||
28803,
|
||||
28993,
|
||||
29178,
|
||||
29359,
|
||||
29535,
|
||||
29707,
|
||||
29875,
|
||||
30038,
|
||||
30196,
|
||||
30350,
|
||||
30499,
|
||||
30644,
|
||||
30784,
|
||||
30920,
|
||||
28898,
|
||||
28992,
|
||||
29085,
|
||||
29177,
|
||||
29268,
|
||||
29358,
|
||||
29447,
|
||||
29534,
|
||||
29621,
|
||||
29706,
|
||||
29791,
|
||||
29874,
|
||||
29956,
|
||||
30037,
|
||||
30117,
|
||||
30195,
|
||||
30273,
|
||||
30349,
|
||||
30424,
|
||||
30498,
|
||||
30571,
|
||||
30643,
|
||||
30714,
|
||||
30783,
|
||||
30852,
|
||||
30919,
|
||||
30985,
|
||||
31050,
|
||||
31177,
|
||||
31298,
|
||||
31415,
|
||||
31527,
|
||||
31634,
|
||||
31737,
|
||||
31834,
|
||||
31927,
|
||||
32015,
|
||||
32099,
|
||||
32177,
|
||||
32251,
|
||||
32319,
|
||||
32383,
|
||||
32442,
|
||||
32496,
|
||||
32546,
|
||||
32590,
|
||||
32629,
|
||||
32664,
|
||||
32693,
|
||||
32718,
|
||||
32738,
|
||||
32753,
|
||||
32762,
|
||||
32767,
|
||||
31113,
|
||||
31176,
|
||||
31237,
|
||||
31297,
|
||||
31356,
|
||||
31414,
|
||||
31470,
|
||||
31526,
|
||||
31580,
|
||||
31633,
|
||||
31685,
|
||||
31736,
|
||||
31785,
|
||||
31833,
|
||||
31880,
|
||||
31926,
|
||||
31971,
|
||||
32014,
|
||||
32057,
|
||||
32098,
|
||||
32137,
|
||||
32176,
|
||||
32213,
|
||||
32250,
|
||||
32285,
|
||||
32318,
|
||||
32351,
|
||||
32382,
|
||||
32412,
|
||||
32441,
|
||||
32469,
|
||||
32495,
|
||||
32521,
|
||||
32545,
|
||||
32567,
|
||||
32589,
|
||||
32609,
|
||||
32628,
|
||||
32646,
|
||||
32663,
|
||||
32678,
|
||||
32692,
|
||||
32705,
|
||||
32717,
|
||||
32728,
|
||||
32737,
|
||||
32745,
|
||||
32752,
|
||||
32757,
|
||||
32761,
|
||||
32765,
|
||||
32766,
|
||||
32767
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user