feat(snd): implement trigger event behaviour for lfsr

This commit is contained in:
Rekai Nyangadzayi Musuka 2021-06-24 01:28:00 -05:00
parent 278953ab78
commit c5aafab3ef
1 changed files with 6 additions and 0 deletions

View File

@ -749,6 +749,9 @@ pub(crate) struct Channel4 {
// Length Functionality
length_timer: u16,
/// Linear Feedback Shift Register (15-bit)
lfsr: u16,
}
impl Channel4 {
@ -781,6 +784,9 @@ impl Channel4 {
if self.length_timer == 0 {
self.length_timer = 64;
}
// LFSR behaviour during trigger event
self.lfsr = 0x7FFF;
}
}
}