cli tools: fix frame size estimation when frame_length isn't provided#831
cli tools: fix frame size estimation when frame_length isn't provided#831baranovmv wants to merge 2 commits into
Conversation
|
🤖 Pull request description does not have a link to an issue. |
| return spec.ns_2_samples_overall(io_config.frame_length) * sizeof(audio::sample_t); | ||
| core::nanoseconds_t len = io_config.frame_length; | ||
| if (len == 0) { | ||
| len = 10 * core::Millisecond; |
There was a problem hiding this comment.
Let's add:
DefaultFrameLength = 10 * core::Millisecond;to roc_sndio/io_config.h and remove it from:
roc_sndio/io_pump.cpproc_sndio/target_pulseaudio/roc_sndio/pulseaudio_device.cpproc_sndio/target_sox/roc_sndio/sox_sink.cpproc_sndio/target_sox/roc_sndio/sox_source.cpp
(all these definitions have same value of 10ms)
...and reuse it in both main.cpp
|
Also please rebase on fresh develop to fix CI |
|
If you remember a command that reproduces the bug, could you create an issue with command and output? I didn't see this issue in my tests. Nice to have, but not critical. |
In multi channel scenario a frame sz become too big and Frame Factory refuses to allocate frames. Here the max frame size is estimated similar way to max packet sz estimation.
7b5f737 to
6c0f5d9
Compare
|
Fixes #821 |
The issue itself needs arguebly a better solution. This PR proposes a hot-fix for basic and straightforward scenarios in our CLI tools. So at the moment there is no easy way to verify the fix proposed in this PR with our unit tests. IMHO the issue reveals a usability problem in our public API and as a consequence lead to a corresponding issue in command line parameter of CLI tools. Let me elaborate on a "better solution" a bit:
|
In multi channel scenario a frame sz become too big and Frame Factory refuses to allocate frames. Here the max frame size is estimated similar way to max packet sz estimation.