mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-18 19:46:14 +02:00
Fix comments - last slice may be bigger, not smaller
This commit is contained in:
parent
f842f5b3b8
commit
6d4b91cf2b
1 changed files with 2 additions and 2 deletions
|
@ -225,7 +225,7 @@ cs::time_point_clk Stream::getNextPlayerChunk(void* outputBuffer, const cs::usec
|
||||||
// Overwriting slices effectively corrects less frames than asked for in framesCorrection.
|
// Overwriting slices effectively corrects less frames than asked for in framesCorrection.
|
||||||
slices = max;
|
slices = max;
|
||||||
}
|
}
|
||||||
// Size of each slice. The last slice may be smaller.
|
// Size of each slice. The last slice may be bigger.
|
||||||
int size = max / slices;
|
int size = max / slices;
|
||||||
|
|
||||||
// LOG(TRACE) << "getNextPlayerChunk, frames: " << framesPerBuffer << ", correction: " << framesCorrection << " (" << toRead << "), slices: " << slices
|
// LOG(TRACE) << "getNextPlayerChunk, frames: " << framesPerBuffer << ", correction: " << framesCorrection << " (" << toRead << "), slices: " << slices
|
||||||
|
@ -235,7 +235,7 @@ cs::time_point_clk Stream::getNextPlayerChunk(void* outputBuffer, const cs::usec
|
||||||
for (size_t n = 0; n < slices; ++n)
|
for (size_t n = 0; n < slices; ++n)
|
||||||
{
|
{
|
||||||
if (n + 1 == slices)
|
if (n + 1 == slices)
|
||||||
// Adjust size in the last iteration, because the last slice may be smaller
|
// Adjust size in the last iteration, because the last slice may be bigger
|
||||||
size = max - pos;
|
size = max - pos;
|
||||||
|
|
||||||
if (framesCorrection < 0)
|
if (framesCorrection < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue