fn initialize(&mut self) {
		// println!("initialize");
		self.enabled = true;
		if self.length_counter == 0 {
			self.length_counter = 64;
		}

		self.frequency_count = (2048 - self.frequency_load) * 4;
		self.envelope_running = true;
		self.envelope_period_counter = self.envelope.period;
		self.volume = self.envelope.initial_volume;
		self.sweep_shadow = self.frequency_load;
		self.sweep_period_counter = if self.sweep.period == 0 {
			8
		} else {
			self.sweep.period
		};
		self.sweep_enable = self.sweep_period_counter > 0 || self.sweep.shift > 0;
		if self.sweep.shift > 0 {
			self.sweep_calculation();
		}
	}
// Initializes channel by resetting all values
Initializes channel by resetting all values
Initializes channel by resetting all values
fn initialize(&mut self) {
		// println!("initialize");
		self.enabled = true;
		if self.length_counter == 0 {
			self.length_counter = 64;
		}
		self.frequency_count = (2048 - self.frequency_load) * 4;
		self.envelope_running = true;
		self.envelope_period_counter = self.envelope.period;
		self.volume = self.envelope.initial_volume;
		self.sweep_shadow = self.frequency_load;
		self.sweep_period_counter = if self.sweep.period == 0 {
			8
		} else {
			self.sweep.period
		};
		self.sweep_enable = self.sweep_period_counter > 0 || self.sweep.shift > 0;
		if self.sweep.shift > 0 {
			self.sweep_calculation();
		}
	}
fn initialize ( & mut self ) { // println!("initialize"); self . enabled = true ; if self . length_counter == 0 { self . length_counter = 64 ; } self . frequency_count = ( 2048 - self . frequency_load ) * 4 ; self . envelope_running = true ; self . envelope_period_counter = self . envelope . period ; self . volume = self . envelope . initial_volume ; self . sweep_shadow = self . frequency_load ; self . sweep_period_counter = if self . sweep . period == 0 { 8 } else { self . sweep . period } ; self . sweep_enable = self . sweep_period_counter > 0 || self . sweep . shift > 0 ; if self . sweep . shift > 0 { self . sweep_calculation ( ) ; } }
Initializes channel by resetting all values
Initializes channel by resetting all values
&mut self
&mut self