pub fn tick(&mut self) {
		if self.frequency_count > 0 {
			self.frequency_count -= 1;
		} else if self.frequency_count == 0 {
			self.frequency_count = (2048 - self.frequency_load) * 2;
			self.position_counter = (self.position_counter + 1) & 0x1F;

			let position = (self.position_counter / 2) as usize;
			let mut output_byte = self.wave_ram[position];

			if (self.position_counter & 1) == 0 {
				output_byte >>= 4;
			}
			output_byte &= 0xF;

			self.sample_byte = output_byte
		}
	}
// Channel NR33/NR34 frequency tick
Channel NR33/NR34 frequency tick
Channel NR33 / NR34 frequency tick
pub fn tick(&mut self) {
		if self.frequency_count > 0 {
			self.frequency_count -= 1;
		} else if self.frequency_count == 0 {
			self.frequency_count = (2048 - self.frequency_load) * 2;
			self.position_counter = (self.position_counter + 1) & 0x1F;
			let position = (self.position_counter / 2) as usize;
			let mut output_byte = self.wave_ram[position];
			if (self.position_counter & 1) == 0 {
				output_byte >>= 4;
			}
			output_byte &= 0xF;
			self.sample_byte = output_byte
		}
	}
pub fn tick ( & mut self ) { if self . frequency_count > 0 { self . frequency_count -= 1 ; } else if self . frequency_count == 0 { self . frequency_count = ( 2048 - self . frequency_load ) * 2 ; self . position_counter = ( self . position_counter + 1 ) & 0x1F ; let position = ( self . position_counter / 2 ) as usize ; let mut output_byte = self . wave_ram [ position ] ; if ( self . position_counter & 1 ) == 0 { output_byte >>= 4 ; } output_byte &= 0xF ; self . sample_byte = output_byte } }
Channel NR33/NR34 frequency tick
Channel NR33 / NR34 frequency tick
&mut self
&mut self