diff --git a/decode.cc b/decode.cc index 20d0fb1..a6c5ef9 100644 --- a/decode.cc +++ b/decode.cc @@ -352,7 +352,7 @@ struct Decoder : Common } } DSP::quick_sort(snr, symbol_count); - std::cerr << "Es/N0 (dB): " << std::fixed << std::setprecision(1) << DSP::decibel(snr[0]) << " .. " << DSP::decibel(snr[symbol_count/2]) << " .. " << DSP::decibel(snr[symbol_count-1]) << std::endl; + std::cerr << "Es/N0 (dB): " << DSP::decibel(snr[0]) << " .. " << DSP::decibel(snr[symbol_count/2]) << " .. " << DSP::decibel(snr[symbol_count-1]) << std::endl; crc_bits = data_bits + 32; shuffle(code, perm); polar_decoder(nullptr, mesg, code, frozen_bits, code_order); @@ -411,6 +411,7 @@ int main(int argc, char **argv) return 1; } + std::cerr << std::fixed << std::setprecision(1); int output_count = argc - 2; switch (input_file.rate()) { case 8000: diff --git a/encode.cc b/encode.cc index aecfaea..442a6f9 100644 --- a/encode.cc +++ b/encode.cc @@ -294,7 +294,7 @@ struct Encoder : public Common symbol(j); } DSP::quick_sort(papr, symbol_count); - std::cerr << "PAPR (dB): " << std::fixed << std::setprecision(1) << DSP::decibel(papr[0]) << " .. " << DSP::decibel(papr[symbol_count/2]) << " .. " << DSP::decibel(papr[symbol_count-1]) << std::endl; + std::cerr << "PAPR (dB): " << DSP::decibel(papr[0]) << " .. " << DSP::decibel(papr[symbol_count/2]) << " .. " << DSP::decibel(papr[symbol_count-1]) << std::endl; } finish(); } @@ -330,6 +330,7 @@ int main(int argc, char **argv) std::cerr << "Unsupported frequency offset." << std::endl; return 1; } + std::cerr << std::fixed << std::setprecision(1); typedef float value; typedef DSP::Complex cmplx; DSP::WriteWAV output_file(output_name, output_rate, output_bits, output_chan);