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:
Karl Tomlinson 2013-11-05 13:02:55 +13:00
parent 49bfad7062
commit e59fa0ae11

View File

@ -131,7 +131,7 @@ AudioBuffer::CopyFromChannel(const Float32Array& aDestination, uint32_t aChannel
const float* sourceData = mSharedChannels ? const float* sourceData = mSharedChannels ?
mSharedChannels->GetData(aChannelNumber) : mSharedChannels->GetData(aChannelNumber) :
JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]); JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]);
PodCopy(aDestination.Data(), sourceData + aStartInChannel, length); PodMove(aDestination.Data(), sourceData + aStartInChannel, length);
} }
void void
@ -159,7 +159,7 @@ AudioBuffer::CopyToChannel(JSContext* aJSContext, const Float32Array& aSource,
return; return;
} }
PodCopy(JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]) + aStartInChannel, PodMove(JS_GetFloat32ArrayData(mJSChannels[aChannelNumber]) + aStartInChannel,
aSource.Data(), length); aSource.Data(), length);
} }