minimodem catch-up shift just 1 frame

This commit is contained in:
Kamal Mostafa 2011-05-29 12:52:23 -07:00
parent d1ce25db02
commit 1ba9f7aa6f
1 changed files with 7 additions and 5 deletions

View File

@ -284,8 +284,10 @@ reprocess_audio:
int carrier_detect /*boolean*/ =
mag_mark + mag_space > CD_MIN_TONEMAG
&&
fabs(msdelta) > CD_MIN_MSDELTA_RATIO * MAX(mag_mark, mag_space);
// MIN(mag_mark, mag_space) < 0.1;
fabs(msdelta) > CD_MIN_MSDELTA_RATIO * MAX(mag_mark, mag_space)
// fabs(msdelta) > 0.4 * (mag_mark+mag_space)
// fabs(msdelta) > 0.1
;
#ifdef TRICK
@ -298,12 +300,12 @@ reprocess_audio:
if ( nframes == nsamples ) {
#if 1
/* shift by 1/2 the width of one data bit */
// any of these work ...
// any of these could work ...
// nframes = nsamples / 2;
nframes = nsamples / 4;
// nframes = nsamples / 4;
// nframes = nsamples / 8;
// nframes = nsamples / 16;
// nframes = 1;
nframes = 1;
nframes = nframes ? nframes : 1;
#endif
}