Fix copy on bit depth mismatch

This commit is contained in:
Miku AuahDark
2020-09-22 13:50:49 +08:00
parent 87e1955bcf
commit e8ddcdceb2
+1 -1
View File
@@ -276,7 +276,7 @@ void SoundData::copyFrom(const SoundData *src, int srcStart, int count, int dstS
{
// Bit depth mismatch, use get/setSample at loop
for (int i = 0; i < count * channels; i++)
setSample(dstStart + i, src->getSample(srcStart + i));
setSample(dstStart * channels + i, src->getSample(srcStart * channels + i));
}
else if (this->data == src->data)
// May overlap, use memmove