48 lines
2.2 KiB
Diff
48 lines
2.2 KiB
Diff
diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
|
|
index e70eacc2a334517a453be4f1f34c82955adaed86..f914da5a8f8d1db9f19f41c910f2b8a44cd21ec2 100644
|
|
--- a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
|
|
+++ b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
|
|
@@ -202,6 +202,7 @@ AudioBuffer::AudioBuffer(AudioBus* bus)
|
|
}
|
|
|
|
NotShared<DOMFloat32Array> AudioBuffer::getChannelData(
|
|
+ ScriptState* script_state,
|
|
unsigned channel_index,
|
|
ExceptionState& exception_state) {
|
|
if (channel_index >= channels_.size()) {
|
|
@@ -213,6 +214,7 @@ NotShared<DOMFloat32Array> AudioBuffer::getChannelData(
|
|
return NotShared<DOMFloat32Array>(nullptr);
|
|
}
|
|
|
|
+ BRAVE_AUDIOBUFFER_GETCHANNELDATA
|
|
return getChannelData(channel_index);
|
|
}
|
|
|
|
@@ -224,13 +226,15 @@ NotShared<DOMFloat32Array> AudioBuffer::getChannelData(unsigned channel_index) {
|
|
return NotShared<DOMFloat32Array>(channels_[channel_index].Get());
|
|
}
|
|
|
|
-void AudioBuffer::copyFromChannel(NotShared<DOMFloat32Array> destination,
|
|
+void AudioBuffer::copyFromChannel(ScriptState* script_state,
|
|
+ NotShared<DOMFloat32Array> destination,
|
|
int32_t channel_number,
|
|
ExceptionState& exception_state) {
|
|
- return copyFromChannel(destination, channel_number, 0, exception_state);
|
|
+ return copyFromChannel(script_state, destination, channel_number, 0, exception_state);
|
|
}
|
|
|
|
-void AudioBuffer::copyFromChannel(NotShared<DOMFloat32Array> destination,
|
|
+void AudioBuffer::copyFromChannel(ScriptState* script_state,
|
|
+ NotShared<DOMFloat32Array> destination,
|
|
int32_t channel_number,
|
|
size_t buffer_offset,
|
|
ExceptionState& exception_state) {
|
|
@@ -267,6 +271,7 @@ void AudioBuffer::copyFromChannel(NotShared<DOMFloat32Array> destination,
|
|
DCHECK(dst.data());
|
|
|
|
dst.first(count).copy_from(src.subspan(buffer_offset, count));
|
|
+ BRAVE_AUDIOBUFFER_COPYFROMCHANNEL
|
|
}
|
|
|
|
void AudioBuffer::copyToChannel(NotShared<DOMFloat32Array> source,
|