Index: third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp |
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp |
index 294a59f0536253049358697418b8dfca28c54bce..cc89ce9dd09aa51ddf5a7efd2d0971419389b841 100644 |
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp |
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp |
@@ -203,13 +203,13 @@ DOMFloat32Array* AudioBuffer::getChannelData(unsigned channelIndex) { |
return m_channels[channelIndex].get(); |
} |
-void AudioBuffer::copyFromChannel(DOMFloat32Array* destination, |
+void AudioBuffer::copyFromChannel(const NotShared<DOMFloat32Array>& destination, |
haraken
2017/04/06 08:43:54
Would it be possible to make NotShared<> be passed
binji
2017/04/09 00:40:02
Done.
|
long channelNumber, |
ExceptionState& exceptionState) { |
return copyFromChannel(destination, channelNumber, 0, exceptionState); |
} |
-void AudioBuffer::copyFromChannel(DOMFloat32Array* destination, |
+void AudioBuffer::copyFromChannel(const NotShared<DOMFloat32Array>& destination, |
long channelNumber, |
unsigned long startInChannel, |
ExceptionState& exceptionState) { |
@@ -238,10 +238,10 @@ void AudioBuffer::copyFromChannel(DOMFloat32Array* destination, |
} |
unsigned count = channelData->length() - startInChannel; |
- count = std::min(destination->length(), count); |
+ count = std::min(destination.view()->length(), count); |
const float* src = channelData->data(); |
- float* dst = destination->data(); |
+ float* dst = destination.view()->data(); |
DCHECK(src); |
DCHECK(dst); |
@@ -249,13 +249,13 @@ void AudioBuffer::copyFromChannel(DOMFloat32Array* destination, |
memcpy(dst, src + startInChannel, count * sizeof(*src)); |
} |
-void AudioBuffer::copyToChannel(DOMFloat32Array* source, |
+void AudioBuffer::copyToChannel(const NotShared<DOMFloat32Array>& source, |
long channelNumber, |
ExceptionState& exceptionState) { |
return copyToChannel(source, channelNumber, 0, exceptionState); |
} |
-void AudioBuffer::copyToChannel(DOMFloat32Array* source, |
+void AudioBuffer::copyToChannel(const NotShared<DOMFloat32Array>& source, |
long channelNumber, |
unsigned long startInChannel, |
ExceptionState& exceptionState) { |
@@ -284,9 +284,9 @@ void AudioBuffer::copyToChannel(DOMFloat32Array* source, |
} |
unsigned count = channelData->length() - startInChannel; |
- count = std::min(source->length(), count); |
+ count = std::min(source.view()->length(), count); |
- const float* src = source->data(); |
+ const float* src = source.view()->data(); |
float* dst = channelData->data(); |
DCHECK(src); |