Struct amethyst_audio::DjSystem
[−]
[src]
pub struct DjSystem<F, R> { /* fields omitted */ }
Calls a closure if the AudioSink
is empty.
Methods
impl<F, R> DjSystem<F, R>
[src]
fn new(f: F) -> Self
[src]
Creates a new DjSystem
with the music picker being f
.
The closure takes a parameter, which needs to be a reference to
a resource type, e.g. &MusicLibrary
. This resource will be fetched
by the system and passed to the picker.
Trait Implementations
impl<'a, F, R> System<'a> for DjSystem<F, R> where
F: FnMut(&mut R) -> Option<SourceHandle>,
R: Resource,
[src]
F: FnMut(&mut R) -> Option<SourceHandle>,
R: Resource,
type SystemData = (Fetch<'a, AssetStorage<Source>>, Fetch<'a, Errors>, Fetch<'a, AudioSink>, FetchMut<'a, R>)
The resource bundle required to execute this system. Read more
fn run(&mut self, (storage, errors, sink, res): Self::SystemData)
[src]
Executes the system with the required system data. Read more
fn running_time(&self) -> RunningTime
[src]
Returns a hint how long the system needs for running. This is used to optimize the way they're executed (might allow more parallelization). Read more