Skip to content

Commit

Permalink
Used sizeof sample instead of assuming.
Browse files Browse the repository at this point in the history
  • Loading branch information
nolan-veed committed Nov 13, 2023
1 parent 58b5d9b commit fc114b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/tools/roc_recv/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ int main(int argc, char** argv) {
}

if (!args.max_frame_size_given) {
// 2 bytes per sample?
context_config.max_frame_size = 2
context_config.max_frame_size = sizeof(audio::sample_t)
* receiver_config.common.output_sample_spec.ns_2_samples_overall(
io_config.frame_length);
}
Expand Down
3 changes: 1 addition & 2 deletions src/tools/roc_send/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ int main(int argc, char** argv) {
}

if (!args.max_frame_size_given) {
// 2 bytes per sample?
context_config.max_frame_size = 2
context_config.max_frame_size = sizeof(audio::sample_t)
* sender_config.input_sample_spec.ns_2_samples_overall(
io_config.frame_length);
}
Expand Down

0 comments on commit fc114b1

Please sign in to comment.