mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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
|
@ -38,13 +38,12 @@ pub struct OscillatorNode {
|
|||
|
||||
impl OscillatorNode {
|
||||
#[allow(unrooted_must_root)]
|
||||
#[allow(unsafe_code)]
|
||||
pub fn new_inherited(
|
||||
window: &Window,
|
||||
context: &BaseAudioContext,
|
||||
oscillator_options: &OscillatorOptions,
|
||||
) -> OscillatorNode {
|
||||
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