Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Jul 25, 2024
1 parent 5c07436 commit c8af27a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func (s *Sampler) Next(t float64, modMap ModulesMap, filtersMap FiltersMap) {
}

func (s *Sampler) sample(t, freq float64, modMap ModulesMap) float64 {
if freq == 0 {
return s.current.Mono
}
secondsBetweenTwoBeats := 1 / freq
if t-s.lastTriggeredAt >= secondsBetweenTwoBeats {
s.lastTriggeredAt = t
Expand Down

0 comments on commit c8af27a

Please sign in to comment.