diff options
author | Andreas Pehrson <[email protected]> | 2023-11-06 23:25:44 +0100 |
---|---|---|
committer | Matthew Gregan <[email protected]> | 2023-11-07 12:04:32 +1300 |
commit | 785a3ca15545b386536574e8a1984605591070ea (patch) | |
tree | e68180b07951cc325552fd6c4e05560916fbc4f0 /test/test_duplex.cpp | |
parent | 5f0d17373b8913aaa583041857f086e8b54217bd (diff) | |
download | cubeb-785a3ca15545b386536574e8a1984605591070ea.tar.gz cubeb-785a3ca15545b386536574e8a1984605591070ea.zip |
In test_duplex loop back all input frames
The break removed here makes sense for input-only, where breaking has no
side effects. In a loopback duplex case like here it makes the callback
exit early, before having written all frames. This can be caused by
clipping on the input side (as observed on MacOS) and creates a
distortion that sounds terrible.
Diffstat (limited to 'test/test_duplex.cpp')
-rw-r--r-- | test/test_duplex.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/test/test_duplex.cpp b/test/test_duplex.cpp index 1eb661e..6eeca8c 100644 --- a/test/test_duplex.cpp +++ b/test/test_duplex.cpp @@ -50,7 +50,6 @@ long data_cb_duplex(cubeb_stream * stream, void * user, const void * inputbuffer for (long i = 0; i < nframes; i++) { if (ib[i] <= -1.0 || ib[i] >= 1.0) { u->invalid_audio_value = 1; - break; } ob[output_index] = ob[output_index + 1] = ib[i]; output_index += 2; |