Fixed DSP

This commit is contained in:
Ryzerth
2020-11-04 00:42:39 +01:00
parent 5d320fdd53
commit 3156236745
10 changed files with 25 additions and 34 deletions

View File

@ -179,13 +179,13 @@ private:
while (true) {
int count = _this->audioStream->read();
if (count < 0) { break; }
for (int i = 0; i < 1024; i++) {
for (int i = 0; i < 240; i++) {
sampleBuf[(i * 2) + 0] = _this->audioStream->data[i].l * 0x7FFF;
sampleBuf[(i * 2) + 1] = _this->audioStream->data[i].r * 0x7FFF;
}
_this->audioStream->flush();
_this->samplesWritten += 1024;
_this->writer->writeSamples(sampleBuf, 2048 * sizeof(int16_t));
_this->samplesWritten += 240;
_this->writer->writeSamples(sampleBuf, 480 * sizeof(int16_t));
}
delete[] sampleBuf;
}