-
Notifications
You must be signed in to change notification settings - Fork 873
/
third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch
47 lines (40 loc) · 2.2 KB
/
third_party-blink-renderer-modules-webaudio-audio_buffer.cc.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
diff --git a/third_party/blink/renderer/modules/webaudio/audio_buffer.cc b/third_party/blink/renderer/modules/webaudio/audio_buffer.cc
index 08ac36d0df9fd8c09d54b6300b9781d4678830bf..c3ee210ee68ec4ffbde553b385616e20a002391e 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) {
@@ -271,6 +275,7 @@ void AudioBuffer::copyFromChannel(NotShared<DOMFloat32Array> destination,
DCHECK_LE(buffer_offset + count, data_length);
memmove(dst, src + buffer_offset, count * sizeof(*src));
+ BRAVE_AUDIOBUFFER_COPYFROMCHANNEL
}
void AudioBuffer::copyToChannel(NotShared<DOMFloat32Array> source,