diff options
| author | Mooneer Salem <[email protected]> | 2024-03-29 21:17:00 -0700 |
|---|---|---|
| committer | Mooneer Salem <[email protected]> | 2024-03-29 21:17:00 -0700 |
| commit | 7098a9bf67d8339429dbc8caac19e4dbed7ecdb8 (patch) | |
| tree | ab55fe09edb4f1d8701e89e390c838732db91512 /src | |
| parent | 203b3f7c3d9711aea479a331741c3b4edc8ce4b8 (diff) | |
Fix clang-format errors from last commit.ms-libasan-crash-fix
Diffstat (limited to 'src')
| -rw-r--r-- | src/freedv_fsk.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/freedv_fsk.c b/src/freedv_fsk.c index 2660ea1..4d0da5d 100644 --- a/src/freedv_fsk.c +++ b/src/freedv_fsk.c @@ -123,7 +123,12 @@ void freedv_800xa_open(struct freedv *f) { f->bits_per_codec_frame = codec2_bits_per_frame(f->codec2); f->bits_per_modem_frame = f->n_codec_frames * f->bits_per_codec_frame; - int n_packed_bytes = ceil((f->bits_per_modem_frame + 7.0) / 8.0) + 1; /* ~3.5 bits per frame, which needs to be rounded up to 4. */ + + /* + * ~3.5 bits per frame, which needs to be rounded up to 4 because computers + * can't handle half bytes. + */ + int n_packed_bytes = ceil((f->bits_per_modem_frame + 7.0) / 8.0) + 1; if (n_packed_bytes < 8) n_packed_bytes = 8; f->tx_payload_bits = MALLOC(n_packed_bytes); assert(f->tx_payload_bits != NULL); |
