minimodem cd tweaks: perfect 300, perfect 1200

This commit is contained in:
Kamal Mostafa 2011-05-30 18:55:05 -07:00
parent 09083fc035
commit e43deedd44
1 changed files with 9 additions and 1 deletions

View File

@ -246,16 +246,24 @@ reprocess_audio:
#define CD_MIN_TONEMAG 0.1
#define CD_MIN_MSDELTA_RATIO 0.5
float cd_ms_delta;
if ( decode_rate > 600 ) // HORRIBLE HACK
cd_ms_delta = 0.55;
else
cd_ms_delta = 0.2;
/* Detect bfsk carrier */
int carrier_detect /*boolean*/ =
1
&& mag_mark + mag_space > CD_MIN_TONEMAG
&& fabs(msdelta) > cd_ms_delta * (mag_mark+mag_space)
// && MIN(mag_mark, mag_space) < 0.30
// && MAX(mag_mark, mag_space) > 0.80
// && fabs(msdelta) > CD_MIN_MSDELTA_RATIO * MAX(mag_mark, mag_space)
&& fabs(msdelta) > 0.2 * (mag_mark+mag_space)
// && fabs(msdelta) > 0.5
;