DSP performance upgrades + bugfix

This commit is contained in:
Ryzerth
2021-03-29 21:53:43 +02:00
parent b72246d769
commit 27394a091f
29 changed files with 942 additions and 355 deletions

View File

@ -226,8 +226,8 @@ private:
int count = transfer->valid_length / 2;
int8_t* buffer = (int8_t*)transfer->buffer;
for (int i = 0; i < count; i++) {
_this->stream.writeBuf[i].i = (float)buffer[i * 2] / 128.0f;
_this->stream.writeBuf[i].q = (float)buffer[(i * 2) + 1] / 128.0f;
_this->stream.writeBuf[i].re = (float)buffer[i * 2] / 128.0f;
_this->stream.writeBuf[i].im = (float)buffer[(i * 2) + 1] / 128.0f;
}
if (!_this->stream.swap(count)) { return -1; }
return 0;