pub struct PlayerEngine {
pub finished_tracks: Arc<Mutex<Vec<u16>>>,
/* private fields */
}Expand description
Internal playback engine used by the high-level [Player].
Fields§
§finished_tracks: Arc<Mutex<Vec<u16>>>Implementations§
Source§impl PlayerEngine
impl PlayerEngine
Sourcepub fn new(
prot: Arc<Mutex<Prot>>,
abort_option: Option<Arc<AtomicBool>>,
start_time: f64,
buffer_settings: Arc<Mutex<PlaybackBufferSettings>>,
effects: Arc<Mutex<Vec<AudioEffect>>>,
dsp_metrics: Arc<Mutex<DspChainMetrics>>,
effects_reset: Arc<AtomicU64>,
) -> Self
pub fn new( prot: Arc<Mutex<Prot>>, abort_option: Option<Arc<AtomicBool>>, start_time: f64, buffer_settings: Arc<Mutex<PlaybackBufferSettings>>, effects: Arc<Mutex<Vec<AudioEffect>>>, dsp_metrics: Arc<Mutex<DspChainMetrics>>, effects_reset: Arc<AtomicU64>, ) -> Self
Create a new engine for the given container and settings.
Sourcepub fn reception_loop(&mut self, f: &dyn Fn((SamplesBuffer, f64)))
pub fn reception_loop(&mut self, f: &dyn Fn((SamplesBuffer, f64)))
Start the mixing loop and invoke f for each mixed chunk.
Sourcepub fn start_receiver(&mut self) -> Receiver<(SamplesBuffer, f64)>
pub fn start_receiver(&mut self) -> Receiver<(SamplesBuffer, f64)>
Start mixing and return a receiver for (buffer, duration) chunks.
Sourcepub fn get_duration(&self) -> f64
pub fn get_duration(&self) -> f64
Get the total duration (seconds) of the active selection.
Sourcepub fn finished_buffering(&self) -> bool
pub fn finished_buffering(&self) -> bool
Return true if all tracks have reported end-of-stream.
Trait Implementations§
Source§impl Clone for PlayerEngine
impl Clone for PlayerEngine
Source§fn clone(&self) -> PlayerEngine
fn clone(&self) -> PlayerEngine
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PlayerEngine
impl RefUnwindSafe for PlayerEngine
impl Send for PlayerEngine
impl Sync for PlayerEngine
impl Unpin for PlayerEngine
impl UnwindSafe for PlayerEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more