From 6f8895d89e983f186e162abf9225cf6c7b8f1016 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 16 Feb 2023 22:53:14 +0100 Subject: Fix broken choke timing when humanized timing/latency is enabled. --- src/inputprocessor.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/inputprocessor.h') diff --git a/src/inputprocessor.h b/src/inputprocessor.h index 18bb583..a8dc45b 100644 --- a/src/inputprocessor.h +++ b/src/inputprocessor.h @@ -64,10 +64,23 @@ private: bool processChoke(event_t& event, std::size_t pos, double resample_ratio); bool processStop(event_t& event); + //! Applies choke with rampdown time in ms to event starting at offset. + void applyChoke(Settings& settings, SampleEvent& event, + double length_ms, timepos_t offset, std::size_t pos); + + //! Applies choke group actions to active events based on the input event + void applyChokeGroup(Settings& settings, DrumKit& kit, + Instrument& instr, event_t& event, + EventsDS& events_ds, std::size_t pos); + //! Applies directed choke actions to active events based on the input event + void applyDirectedChoke(Settings& settings, DrumKit& kit, + Instrument& instr, event_t& event, + EventsDS& events_ds, std::size_t pos); + //! Ramps down samples from events_ds is there are more groups playing than //! max_voices for a given instrument. void limitVoices(std::size_t instrument_id, std::size_t max_voices, - float rampdown_time); + float rampdown_time, std::size_t pos); std::vector> filters; -- cgit v1.2.3