From 6ac30fac63342c54e13c73d28955ef382644c9e1 Mon Sep 17 00:00:00 2001 From: Jakob Schwab Date: Tue, 26 Jan 2021 10:16:32 +0100 Subject: [PATCH 1/2] Makes slice argument of `web_sys::AudioBuffer::copy_to_channel*` non mutable (#2434) --- crates/webidl/src/constants.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/webidl/src/constants.rs b/crates/webidl/src/constants.rs index 14e82a0e4f8..447e3e48d79 100644 --- a/crates/webidl/src/constants.rs +++ b/crates/webidl/src/constants.rs @@ -88,6 +88,8 @@ lazy_static! { "setBindGroup", "writeBuffer", "writeTexture", + // AudioBuffer + "copyToChannel" // TODO: Add another type's functions here. Leave a comment header with the type name ]); } From 3cca214e52efe3f98ef50ba63cffd079a1b34bb4 Mon Sep 17 00:00:00 2001 From: Jakob Schwab Date: Tue, 26 Jan 2021 11:06:21 +0100 Subject: [PATCH 2/2] Commit newly generated API --- crates/web-sys/src/features/gen_AudioBuffer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/web-sys/src/features/gen_AudioBuffer.rs b/crates/web-sys/src/features/gen_AudioBuffer.rs index 7f8851a16fb..5f350bc6f64 100644 --- a/crates/web-sys/src/features/gen_AudioBuffer.rs +++ b/crates/web-sys/src/features/gen_AudioBuffer.rs @@ -78,7 +78,7 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"] pub fn copy_to_channel( this: &AudioBuffer, - source: &mut [f32], + source: &[f32], channel_number: i32, ) -> Result<(), JsValue>; # [wasm_bindgen (catch , method , structural , js_class = "AudioBuffer" , js_name = copyToChannel)] @@ -89,7 +89,7 @@ extern "C" { #[doc = "*This API requires the following crate features to be activated: `AudioBuffer`*"] pub fn copy_to_channel_with_start_in_channel( this: &AudioBuffer, - source: &mut [f32], + source: &[f32], channel_number: i32, start_in_channel: u32, ) -> Result<(), JsValue>;