Oversample (#1336)

* WIP Oversample cleanup

* WIP

* WIP

* WIP dynamic interpolation

* WIP cleanup

* Fix math errors

* Add some optional assertions

* Add support for x32 interpolation

* Update proc_replay.cpp

Typo
This commit is contained in:
Kyle Reed 2023-08-02 12:59:26 -07:00 committed by GitHub
parent e2ad0a1b1a
commit 37386c29cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 272 additions and 169 deletions

View file

@ -80,6 +80,8 @@ uint32_t ReplayThread::run() {
chThdSleep(100);
};
constexpr size_t block_size = 512;
// While empty buffers fifo is not empty...
while (!buffers.empty()) {
prefill_buffer = buffers.get_prefill();
@ -87,10 +89,10 @@ uint32_t ReplayThread::run() {
if (prefill_buffer == nullptr) {
buffers.put_app(prefill_buffer);
} else {
size_t blocks = config.read_size / 512;
size_t blocks = config.read_size / block_size;
for (size_t c = 0; c < blocks; c++) {
auto read_result = reader->read(&((uint8_t*)prefill_buffer->data())[c * 512], 512);
auto read_result = reader->read(&((uint8_t*)prefill_buffer->data())[c * block_size], block_size);
if (read_result.is_error()) {
return READ_ERROR;
}