Skip to content

Commit 743135f

Browse files
authored
Makes slice argument of web_sys::AudioBuffer::copy_to_channel* non mutable (#2434) (#2436)
* Makes slice argument of `web_sys::AudioBuffer::copy_to_channel*` non mutable (#2434) * Commit newly generated API
1 parent b6355c2 commit 743135f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/web-sys/src/features/gen_AudioBuffer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ extern "C" {
7878
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
7979
pub fn copy_to_channel(
8080
this: &AudioBuffer,
81-
source: &mut [f32],
81+
source: &[f32],
8282
channel_number: i32,
8383
) -> Result<(), JsValue>;
8484
# [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel)]
@@ -89,7 +89,7 @@ extern "C" {
8989
#[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"]
9090
pub fn copy_to_channel_with_start_in_channel(
9191
this: &AudioBuffer,
92-
source: &mut [f32],
92+
source: &[f32],
9393
channel_number: i32,
9494
start_in_channel: u32,
9595
) -> Result<(), JsValue>;

crates/webidl/src/constants.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ lazy_static! {
8888
"setBindGroup",
8989
"writeBuffer",
9090
"writeTexture",
91+
// AudioBuffer
92+
"copyToChannel"
9193
// TODO: Add another type's functions here. Leave a comment header with the type name
9294
]);
9395
}

0 commit comments

Comments
 (0)