Commit f4b6e9e3 authored by Tim Janik's avatar Tim Janik

SRC: wmget.cc: keep clip, type fields aligned in JSON output

Signed-off-by: 's avatarTim Janik <timj@gnu.org>
parent a383c9c5
...@@ -207,11 +207,11 @@ public: ...@@ -207,11 +207,11 @@ public:
case ConvBlockType::ab: blockc = "\"AB\""; break; case ConvBlockType::ab: blockc = "\"AB\""; break;
} }
const int seconds = pattern.sync_score.index / Params::mark_sample_rate; const int seconds = pattern.sync_score.index / Params::mark_sample_rate;
fprintf (outfile, " { \"pos\": \"%d:%02d\", \"bits\": \"%s\", \"quality\": %.5f, \"error\": %.6f, \"clip\": %s, \"type\": %s }", fprintf (outfile, " { \"pos\": \"%d:%02d\", \"bits\": \"%s\", \"quality\": %.5f, \"error\": %.6f, \"clip\": %-6s \"type\": %s }",
seconds / 60, seconds % 60, seconds / 60, seconds % 60,
bit_vec_to_str (pattern.bit_vec).c_str(), bit_vec_to_str (pattern.bit_vec).c_str(),
pattern.sync_score.quality, pattern.decode_error, pattern.sync_score.quality, pattern.decode_error,
pattern.type == Type::CLIP ? "true" : "false", blockc); pattern.type == Type::CLIP ? "true," : "false,", blockc);
} }
} }
fprintf (outfile, " ]\n}\n"); fprintf (outfile, " ]\n}\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment