Wrap around when pushing single samples

This commit is contained in:
OV2 2023-03-28 18:07:41 +02:00
parent 33d84d31b8
commit 65d07dc838
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,8 @@ class Resampler
if (end >= buffer_size)
end -= buffer_size;
buffer[end] = l;
if (end + 1 == buffer_size)
end -= buffer_size;
buffer[end + 1] = r;
size += 2;
}