[*] amend write ahead check

This commit is contained in:
Reece Wilson 2023-05-11 18:31:47 +01:00
parent ac4968512b
commit e2f16091d9

View File

@ -262,8 +262,8 @@ namespace Aurora::IO
// attempt low-latency read-ahead // attempt low-latency read-ahead
if (!this->bWritingAheadLowLatency && if (!this->bWritingAheadLowLatency &&
this->buffer_.RemainingWrite(this->uFrameCap_) /*ensure we can run ahead*/ && this->buffer_.CanWrite(this->uFrameCap_) /*ensure we can run ahead*/ &&
!this->IsAtRequestedEnd() /*do not preemptively terminate before the last callback is fired*/) !this->IsAtRequestedEnd() /*do not preemptively terminate before the last callback is fired*/)
{ {
this->bWritingAheadLowLatency = true; this->bWritingAheadLowLatency = true;
this->ReadNext(); this->ReadNext();