mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Remove unsafe code to create empty AudioNodeOptions
This commit is contained in:
parent
b87fc17b4b
commit
911b8ebd79
4 changed files with 11 additions and 27 deletions
|
@ -31,14 +31,13 @@ pub struct GainNode {
|
|||
}
|
||||
|
||||
impl GainNode {
|
||||
#[allow(unsafe_code)]
|
||||
#[allow(unrooted_must_root)]
|
||||
pub fn new_inherited(
|
||||
window: &Window,
|
||||
context: &BaseAudioContext,
|
||||
gain_options: &GainOptions,
|
||||
) -> GainNode {
|
||||
let mut node_options = unsafe { AudioNodeOptions::empty(window.get_cx()) };
|
||||
let mut node_options = AudioNodeOptions::empty();
|
||||
node_options.channelCount = Some(2);
|
||||
node_options.channelCountMode = Some(ChannelCountMode::Max);
|
||||
node_options.channelInterpretation = Some(ChannelInterpretation::Speakers);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue