Skip to content

Commit 0eab863

Browse files
committed
Fix bungee
1 parent f135f59 commit 0eab863

File tree

1 file changed

+7
-7
lines changed
  • thirdparty/bungee_library/upstream/bungee

1 file changed

+7
-7
lines changed

thirdparty/bungee_library/upstream/bungee/Stream.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -151,19 +151,19 @@ class Stream
151151
framesNeeded += outputFrameCount;
152152

153153
int frameCounter = 0;
154-
for (bool processGrain = false; frameCounter != std::round(framesNeeded); processGrain = true)
154+
for (bool processGrain = false; frameCounter != round(framesNeeded); processGrain = true)
155155
{
156156
if (processGrain)
157157
{
158-
if (!std::isnan(request.position))
158+
if (!isnan(request.position))
159159
{
160160
inputBuffer.analyseGrain();
161161
inputBuffer.stretcher.synthesiseGrain(outputChunk);
162162
outputChunkConsumed = 0;
163163
}
164164

165-
[[maybe_unused]] const double proportionRemaining = 1. - frameCounter / std::round(outputFrameCount);
166-
const double proportionRemainingDenominator = std::round(outputFrameCount);
165+
[[maybe_unused]] const double proportionRemaining = 1. - frameCounter / round(outputFrameCount);
166+
const double proportionRemainingDenominator = round(outputFrameCount);
167167
const double proportionRemainingNumerator = proportionRemainingDenominator - frameCounter;
168168

169169
const auto position = inputBuffer.endPosition() - inputBuffer.stretcher.maxInputFrameCount() / 2 - inputFrameCount * proportionRemainingNumerator / proportionRemainingDenominator;
@@ -172,9 +172,9 @@ class Stream
172172
inputBuffer.inputChunk = inputBuffer.stretcher.specifyGrain(request);
173173
}
174174

175-
if (outputChunk.request[0] && !std::isnan(outputChunk.request[0]->position))
175+
if (outputChunk.request[0] && !isnan(outputChunk.request[0]->position))
176176
{
177-
const int need = std::round(framesNeeded) - frameCounter;
177+
const int need = round(framesNeeded) - frameCounter;
178178
const int available = outputChunk.frameCount - outputChunkConsumed;
179179
const int n = std::min(need, available);
180180

@@ -189,7 +189,7 @@ class Stream
189189
}
190190
}
191191

192-
assert(frameCounter == std::floor(outputFrameCount) || frameCounter == std::ceil(outputFrameCount));
192+
assert(frameCounter == floor(outputFrameCount) || frameCounter == ceil(outputFrameCount));
193193
framesNeeded -= frameCounter;
194194
return frameCounter;
195195
};

0 commit comments

Comments
 (0)