mirror of
https://github.com/RustAudio/rodio
synced 2024-12-14 06:02:31 +00:00
commit
e5474a2ef1
3 changed files with 7 additions and 7 deletions
|
@ -41,7 +41,7 @@ where
|
||||||
/// The input of the mixer.
|
/// The input of the mixer.
|
||||||
pub struct DynamicMixerController<S> {
|
pub struct DynamicMixerController<S> {
|
||||||
has_pending: AtomicBool,
|
has_pending: AtomicBool,
|
||||||
pending_sources: Mutex<Vec<Box<Source<Item = S> + Send>>>,
|
pending_sources: Mutex<Vec<Box<dyn Source<Item = S> + Send>>>,
|
||||||
channels: u16,
|
channels: u16,
|
||||||
sample_rate: u32,
|
sample_rate: u32,
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,7 @@ where
|
||||||
/// The output of the mixer. Implements `Source`.
|
/// The output of the mixer. Implements `Source`.
|
||||||
pub struct DynamicMixer<S> {
|
pub struct DynamicMixer<S> {
|
||||||
// The current iterator that produces samples.
|
// The current iterator that produces samples.
|
||||||
current_sources: Vec<Box<Source<Item = S> + Send>>,
|
current_sources: Vec<Box<dyn Source<Item = S> + Send>>,
|
||||||
|
|
||||||
// The pending sounds.
|
// The pending sounds.
|
||||||
input: Arc<DynamicMixerController<S>>,
|
input: Arc<DynamicMixerController<S>>,
|
||||||
|
|
|
@ -48,7 +48,7 @@ where
|
||||||
|
|
||||||
/// The input of the queue.
|
/// The input of the queue.
|
||||||
pub struct SourcesQueueInput<S> {
|
pub struct SourcesQueueInput<S> {
|
||||||
next_sounds: Mutex<Vec<(Box<Source<Item = S> + Send>, Option<Sender<()>>)>>,
|
next_sounds: Mutex<Vec<(Box<dyn Source<Item = S> + Send>, Option<Sender<()>>)>>,
|
||||||
|
|
||||||
// See constructor.
|
// See constructor.
|
||||||
keep_alive_if_empty: AtomicBool,
|
keep_alive_if_empty: AtomicBool,
|
||||||
|
@ -98,7 +98,7 @@ where
|
||||||
/// The output of the queue. Implements `Source`.
|
/// The output of the queue. Implements `Source`.
|
||||||
pub struct SourcesQueueOutput<S> {
|
pub struct SourcesQueueOutput<S> {
|
||||||
// The current iterator that produces samples.
|
// The current iterator that produces samples.
|
||||||
current: Box<Source<Item = S> + Send>,
|
current: Box<dyn Source<Item = S> + Send>,
|
||||||
|
|
||||||
// Signal this sender before picking from `next`.
|
// Signal this sender before picking from `next`.
|
||||||
signal_after_end: Option<Sender<()>>,
|
signal_after_end: Option<Sender<()>>,
|
||||||
|
|
|
@ -302,7 +302,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> Source for Box<Source<Item = S>>
|
impl<S> Source for Box<dyn Source<Item = S>>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
@ -327,7 +327,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> Source for Box<Source<Item = S> + Send>
|
impl<S> Source for Box<dyn Source<Item = S> + Send>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<S> Source for Box<Source<Item = S> + Send + Sync>
|
impl<S> Source for Box<dyn Source<Item = S> + Send + Sync>
|
||||||
where
|
where
|
||||||
S: Sample,
|
S: Sample,
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue