Skip to content

Commit

Permalink
Timers refactoring (#18)
Browse files Browse the repository at this point in the history
* initial refactoring

* Clearer linked timer

* Fix linked timer next trigger tick crash

* Fix set timer count no dependency

* audio_out zero indexed

* Fix audio feedback param inversion
  • Loading branch information
LLeny authored Dec 17, 2024
1 parent b7d9fd3 commit 66a8d75
Show file tree
Hide file tree
Showing 5 changed files with 370 additions and 530 deletions.
8 changes: 4 additions & 4 deletions src/mikey/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,10 @@ impl Mikey {
}

pub fn audio_sample(&self) -> (i16, i16) {
let audio0 = self.timers.audio_out(8) as f32;
let audio1 = self.timers.audio_out(9) as f32;
let audio2 = self.timers.audio_out(10) as f32;
let audio3 = self.timers.audio_out(11) as f32;
let audio0 = self.timers.audio_out(0) as f32;
let audio1 = self.timers.audio_out(1) as f32;
let audio2 = self.timers.audio_out(2) as f32;
let audio3 = self.timers.audio_out(3) as f32;

let left = ((
audio0 * self.registers.attenuation_left(0) +
Expand Down
314 changes: 0 additions & 314 deletions src/mikey/timers/audio_channel_timer.rs

This file was deleted.

Loading

0 comments on commit 66a8d75

Please sign in to comment.