diff --git a/decode.cc b/decode.cc index 84f9c42..3d7824f 100644 --- a/decode.cc +++ b/decode.cc @@ -41,9 +41,9 @@ struct Decoder typedef SIMD mesg_type; #endif typedef DSP::Const Const; - static const int symbol_len = (1280 * rate) / 8000; + static const int guard_len = rate / 100; + static const int symbol_len = guard_len * 16; static const int filter_len = (((21 * rate) / 8000) & ~3) | 1; - static const int guard_len = symbol_len / 8; static const int extended_len = symbol_len + guard_len; static const int mod_max = 6; static const int code_max = 16; diff --git a/encode.cc b/encode.cc index 5ac942f..a0fc0cb 100644 --- a/encode.cc +++ b/encode.cc @@ -27,8 +27,8 @@ template struct Encoder { typedef int8_t code_type; - static const int symbol_len = (1280 * rate) / 8000; - static const int guard_len = symbol_len / 8; + static const int guard_len = rate / 100; + static const int symbol_len = guard_len * 16; static const int bits_max = 65536; static const int data_max = 1024; static const int mls0_poly = 0b1100110001; @@ -399,8 +399,8 @@ int main(int argc, char **argv) int output_chan = std::atoi(argv[4]); int freq_off = std::atoi(argv[5]); - if (freq_off % 50) { - std::cerr << "Frequency offset must be divisible by 50." << std::endl; + if (freq_off % 100) { + std::cerr << "Frequency offset must be divisible by 100." << std::endl; return 1; } int input_count = argc - 7;