mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
implement {Comp} threshold, ratio, attack, hold, release, makeup and mix methods
add new compressor subcommands to strip/bus command groups
This commit is contained in:
@@ -56,3 +56,13 @@ func toFixed(num float64, precision int) float64 {
|
||||
output := math.Pow(10, float64(precision))
|
||||
return float64(math.Round(num*output)) / output
|
||||
}
|
||||
|
||||
// generic indexOf returns the index of elem in slice, or -1 if not found.
|
||||
func indexOf[T comparable](slice []T, elem T) int {
|
||||
for i, v := range slice {
|
||||
if v == elem {
|
||||
return i
|
||||
}
|
||||
}
|
||||
return -1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user