mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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:
parent
49bfad7062
commit
e59fa0ae11
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user