So I really appreciate the work on this and info from slicerwizard....like Mike, I'm not an expert when it comes to (re)writing c code, so I'd sure appreciate if someone could verify i have the right steps here, to describe in a simple form of what modifications are required:
1. Edit the ecc_const.h file in the mbelib-1.2.3 directory, and add the following text (and a comma after the last 136 item) to the end of the large lookup table that ends 514, 18, 36, 136
257, 512, 192, 2048, 33, 512, 512, 512, 14, 2048,
264, 2048, 2048, 512, 1024, 2048, 80, 24, 258,
2624, 4, 258, 258, 32, 258, 1025, 4, 4, 4, 64,
258, 136, 4, 24, 24, 24, 33, 24, 258, 1028, 2176,
24, 640, 256, 4, 2080, 1024, 515, 80, 1025, 192,
32, 8, 32, 258, 32, 32, 1025, 1025, 1025, 4, 1025,
2568, 32, 80, 24, 2052, 130, 1792, 512, 1, 32, 80,
1025, 34, 2048, 80, 388, 80, 80, 80, 1026, 2064,
1026, 1026, 512, 40, 1026, 68, 2064, 2064, 1026,
2064, 64, 2064, 136, 257, 512, 260, 1026, 33, 512,
512, 512, 2176, 129, 2064, 256, 584, 512, 1024,
52, 2, 512, 192, 1026, 8, 512, 512, 512, 257, 12,
2064, 96, 257, 512, 257, 257, 257, 512, 512, 512,
16, 512, 512, 512, 512, 512, 34, 2048, 1156, 512,
512, 512, 257, 164, 513, 1026, 8, 64, 258, 17,
2176, 64, 2064, 256, 4, 64, 64, 64, 1568, 24,
1088, 256, 2176, 512, 2176, 2176, 2176, 256, 34,
256, 256, 64, 13, 256, 2176, 2304, 8, 8, 8, 512,
1044, 32, 8, 1025, 34, 656, 8, 64, 128, 2054, 257,
512, 34, 69, 8, 512, 512, 512, 2176, 34, 34, 256,
34, 512, 34, 1032, 80
2. In the dsd-1.4.1 directory, edit the dsd_dibit.c file.
find the line:
// determine dibit state
replace it with:
if (state->dibit_buf_p > state->dibit_buf + 900000) state->dibit_buf_p = state->dibit_buf + 200;
// determine dibit state
3. In the dsd-1.4.1 directory, edit the dsd_frame_sync.c file.
find the line:
// determine dibit state
replace it with:
if (state->dibit_buf_p > state->dibit_buf + 900000) state->dibit_buf_p = state->dibit_buf + 200;
// determine dibit state
4. In the dsd-1.4.1 directory, edit the dsd_frame.c file.
Locate the six instances where level = (int) (((float) state->max / (float) 32768) * (float) 100); occurs and replace them with level = state->max / 164;
[Note - I have deliberately skipped the Auto mutes P25 encrypted signals feature as I'm not interested in this - please spell the specific steps to take if you want here]
5. In the dsd-1.4.1 directory, edit the dsd_symbol.c file.
Locate:
result = read (opts->audio_in_fd, &sample, 2);
Replace it with:
result = read (opts->audio_in_fd, &sample, 2);
{
#define NZEROS 60
#define GAIN 7.423339364e+00
static float xv[NZEROS+1];
static float xcoeffs[] =
{ -0.0083649323, -0.0265444850, -0.0428141462, -0.0537571943,
-0.0564141052, -0.0489161045, -0.0310068662, -0.0043393881,
+0.0275375106, +0.0595423283, +0.0857543325, +0.1003565948,
+0.0986944931, +0.0782804830, +0.0395670487, -0.0136691535,
-0.0744390415, -0.1331834575, -0.1788967208, -0.2005995448,
-0.1889627181, -0.1378439993, -0.0454976231, +0.0847488694,
+0.2444859269, +0.4209222342, +0.5982295474, +0.7593684540,
+0.8881539892, +0.9712773915, +0.9999999166, +0.9712773915,
+0.8881539892, +0.7593684540, +0.5982295474, +0.4209222342,
+0.2444859269, +0.0847488694, -0.0454976231, -0.1378439993,
-0.1889627181, -0.2005995448, -0.1788967208, -0.1331834575,
-0.0744390415, -0.0136691535, +0.0395670487, +0.0782804830,
+0.0986944931, +0.1003565948, +0.0857543325, +0.0595423283,
+0.0275375106, -0.0043393881, -0.0310068662, -0.0489161045,
-0.0564141052, -0.0537571943, -0.0428141462, -0.0265444850,
-0.0083649323,
};
float sum; int i;
for (i = 0; i < NZEROS; i++)
xv = xv[i+1];
xv[NZEROS] = sample; // unfiltered sample in
sum = 0.0;
for (i = 0; i <= NZEROS; i++)
sum += (xcoeffs * xv);
sample = sum / GAIN; // filtered sample out
}
6. I assume I then cd to the mbelib-1.2.3 directory, sudo make and then sudo make install
7. I assume I then cd to the dsd-1.4.1 directory, sudo make and then sudo make install
8. I assuming I should then be able to run DSD just as before, but with these new features.
Any corrections/updated would be much appreciated - before I screw up my DSD install !!
Thanks,
Jim