pub fn on_start_processing(&mut self) {
		self.resources.sounds.on_start_processing();
		self.resources.parameters.on_start_processing();
		self.resources.mixer.on_start_processing();
		self.resources.clocks.on_start_processing();

		while let Some(command) = self.command_consumer.pop() {
			match command {
				Command::Sound(command) => self.resources.sounds.run_command(command),
				Command::Parameter(command) => self.resources.parameters.run_command(command),
				Command::Mixer(command) => self.resources.mixer.run_command(command),
				Command::Clock(command) => self.resources.clocks.run_command(command),
				Command::Pause(fade_out_tween) => {
					self.state = MainPlaybackState::Pausing;
					self.context
						.state
						.store(MainPlaybackState::Pausing as u8, Ordering::SeqCst);
					self.fade_volume.set(0.0, fade_out_tween);
				}
				Command::Resume(fade_in_tween) => {
					self.state = MainPlaybackState::Playing;
					self.context
						.state
						.store(MainPlaybackState::Playing as u8, Ordering::SeqCst);
					self.fade_volume.set(1.0, fade_in_tween);
				}
			}
		}
	}
/// Called by the backend when it's time to process
/// a new batch of samples.
Called by the backend when it's time to process
a new batch of samples.
Called by the backend when it ' s time to process a new batch of samples .
pub fn on_start_processing(&mut self) {
		self.resources.sounds.on_start_processing();
		self.resources.parameters.on_start_processing();
		self.resources.mixer.on_start_processing();
		self.resources.clocks.on_start_processing();
		while let Some(command) = self.command_consumer.pop() {
			match command {
				Command::Sound(command) => self.resources.sounds.run_command(command),
				Command::Parameter(command) => self.resources.parameters.run_command(command),
				Command::Mixer(command) => self.resources.mixer.run_command(command),
				Command::Clock(command) => self.resources.clocks.run_command(command),
				Command::Pause(fade_out_tween) => {
					self.state = MainPlaybackState::Pausing;
					self.context
						.state
						.store(MainPlaybackState::Pausing as u8, Ordering::SeqCst);
					self.fade_volume.set(0.0, fade_out_tween);
				}
				Command::Resume(fade_in_tween) => {
					self.state = MainPlaybackState::Playing;
					self.context
						.state
						.store(MainPlaybackState::Playing as u8, Ordering::SeqCst);
					self.fade_volume.set(1.0, fade_in_tween);
				}
			}
		}
	}
pub fn on_start_processing ( & mut self ) { self . resources . sounds . on_start_processing ( ) ; self . resources . parameters . on_start_processing ( ) ; self . resources . mixer . on_start_processing ( ) ; self . resources . clocks . on_start_processing ( ) ; while let Some ( command ) = self . command_consumer . pop ( ) { match command { Command :: Sound ( command ) => self . resources . sounds . run_command ( command ) , Command :: Parameter ( command ) => self . resources . parameters . run_command ( command ) , Command :: Mixer ( command ) => self . resources . mixer . run_command ( command ) , Command :: Clock ( command ) => self . resources . clocks . run_command ( command ) , Command :: Pause ( fade_out_tween ) => { self . state = MainPlaybackState :: Pausing ; self . context . state . store ( MainPlaybackState :: Pausing as u8 , Ordering :: SeqCst ) ; self . fade_volume . set ( 0.0 , fade_out_tween ) ; } Command :: Resume ( fade_in_tween ) => { self . state = MainPlaybackState :: Playing ; self . context . state . store ( MainPlaybackState :: Playing as u8 , Ordering :: SeqCst ) ; self . fade_volume . set ( 1.0 , fade_in_tween ) ; } } } }
Called by the backend when it's time to process
a new batch of samples.
Called by the backend when it ' s time to process a new batch of samples .
&mut self