From 9f9d54d1fd62ceb95808def9c94b559b1e1a2037 Mon Sep 17 00:00:00 2001 From: ashley <ne0ndrag0n@ne0ndrag0n.com> Date: Fri, 25 Aug 2023 14:16:16 -0400 Subject: [PATCH] Update gitignore, fix bug in combining delay events --- .gitignore | 1 + src/reskit/soundtrack/engines/echo.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 96ef6c0..eb1d4ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target Cargo.lock +.vscode \ No newline at end of file diff --git a/src/reskit/soundtrack/engines/echo.rs b/src/reskit/soundtrack/engines/echo.rs index eb2c51c..208c821 100644 --- a/src/reskit/soundtrack/engines/echo.rs +++ b/src/reskit/soundtrack/engines/echo.rs @@ -391,7 +391,7 @@ pub fn compact_delays( events: Vec<EchoEvent> ) -> Result<Vec<EchoEvent>, Box<dy let mut current_sequence: Vec<EchoEvent> = Vec::new(); for event in events { if let Some( esf_event_type ) = event.iter().next() { - if *esf_event_type == ESF_DELAY_SHORT || *esf_event_type == ESF_DELAY_LONG { + if *esf_event_type & 0xF0 == ESF_DELAY_SHORT || *esf_event_type == ESF_DELAY_LONG { // Continue to push delay events into current_sequence current_sequence.push( event ); } else {