зеркало из https://github.com/mozilla/gecko-dev.git
b=856850 use PodMove for potentially overlapping buffers r=roc
--HG-- extra : transplant_source : %A2%F8%85%0C%08%86%CE%E2%7F%A7X%9F%F1%B7%0E%3F%16%1E%BF%3F
This commit is contained in:
Родитель
9440229293
Коммит
05d62a8b18
|
@ -131,7 +131,7 @@ AudioBuffer::CopyFromChannel(const Float32Array& aDestination, uint32_t aChannel
|
|||
const float* sourceData = mSharedChannels ?
|
||||
mSharedChannels->GetData(aChannelNumber) :
|
||||
JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]);
|
||||
PodCopy(aDestination.Data(), sourceData + aStartInChannel, length);
|
||||
PodMove(aDestination.Data(), sourceData + aStartInChannel, length);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -159,7 +159,7 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
|
|||
return;
|
||||
}
|
||||
|
||||
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]) + aStartInChannel,
|
||||
PodMove(JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]) + aStartInChannel,
|
||||
aSource.Data(), length);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче