switched all streams to double buffering

This commit is contained in:
Ryzerth
2020-12-25 16:58:07 +01:00
parent 450896b122
commit 42bc2d01f7
17 changed files with 158 additions and 171 deletions

View File

@ -351,12 +351,11 @@ private:
long long timeMs = 0;
while (_this->running) {
if (_this->stream.aquire() < 0) { break; }
int res = _this->dev->readStream(_this->devStream, (void**)&_this->stream.data, blockSize, flags, timeMs);
int res = _this->dev->readStream(_this->devStream, (void**)&_this->stream.writeBuf, blockSize, flags, timeMs);
if (res < 1) {
continue;
}
_this->stream.write(res);
if (!_this->stream.swap(res)) { return; }
}
}