mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Get destination node engine from context
This commit is contained in:
parent
1c2d872e33
commit
07c0450e29
4 changed files with 15 additions and 3 deletions
|
@ -24,6 +24,7 @@ use dom_struct::dom_struct;
|
|||
use servo_media::ServoMedia;
|
||||
use servo_media::audio::context::{AudioContext, ProcessingState};
|
||||
use servo_media::audio::context::{OfflineAudioContextOptions, RealTimeAudioContextOptions};
|
||||
use servo_media::audio::graph::NodeId;
|
||||
use std::cell::Cell;
|
||||
use std::collections::VecDeque;
|
||||
use std::mem;
|
||||
|
@ -96,6 +97,10 @@ impl BaseAudioContext {
|
|||
&self.audio_context_impl
|
||||
}
|
||||
|
||||
pub fn destination_node(&self) -> NodeId {
|
||||
self.audio_context_impl.dest_node()
|
||||
}
|
||||
|
||||
// https://webaudio.github.io/web-audio-api/#allowed-to-start
|
||||
pub fn is_allowed_to_start(&self) -> bool {
|
||||
self.state.get() == AudioContextState::Suspended
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue