Skip to content

Commit

Permalink
Fix "Attempt to read a non-integer number of channels" with 24-bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dechamps committed Feb 23, 2019
1 parent 8fd2016 commit bc839e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ namespace ASIOTest {
}

std::vector<uint8_t> Read() {
constexpr auto readSizeBytes = 4096;
constexpr auto readSizeBytes = 12 * 1024; // 12 is the least common multiple of 2 (16-bit), 3 (24-bit) and 4 (32-bit), so the read will always be aligned
std::vector<uint8_t> data;
for (;;) {
data.resize(data.size() + readSizeBytes);
Expand Down

0 comments on commit bc839e4

Please sign in to comment.