diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-03-11 15:41:52 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2024-03-11 15:41:52 +0100 |
commit | 03bf901a4bb4cb71fb899a06b17c9932e541d3e4 (patch) | |
tree | a63d31541e60f46572413c5ed80e5b33e45e70d1 /src | |
parent | 01d8415a694bf7a3532e8dc7a6c355cb0ff032cc (diff) | |
download | dabmod-03bf901a4bb4cb71fb899a06b17c9932e541d3e4.tar.gz dabmod-03bf901a4bb4cb71fb899a06b17c9932e541d3e4.tar.bz2 dabmod-03bf901a4bb4cb71fb899a06b17c9932e541d3e4.zip |
Fix wrong clamping in u8 format converter
See issue #55
Diffstat (limited to 'src')
-rw-r--r-- | src/FormatConverter.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FormatConverter.cpp b/src/FormatConverter.cpp index fc4cc2f..e8e76ed 100644 --- a/src/FormatConverter.cpp +++ b/src/FormatConverter.cpp @@ -78,8 +78,8 @@ int FormatConverter::process(Buffer* const dataIn, Buffer* dataOut) out[i] = 0; num_clipped_samples++; } - else if (samp > INT8_MAX) { - out[i] = INT8_MAX; + else if (samp > UINT8_MAX) { + out[i] = UINT8_MAX; num_clipped_samples++; } else { |