docstrings added to functions, types and methods

CHANGELOG first update

pre-commit updated to look in root of repo.

version retraction added to go.mod

README updated to reflect changes
This commit is contained in:
onyx-and-iris
2022-07-10 23:08:14 +01:00
parent 36522cf80c
commit 1efac19b12
22 changed files with 351 additions and 113 deletions

View File

@@ -1,8 +1,6 @@
package voicemeeter
import "math"
// levels
// levels represents the levels field for a channel
type levels struct {
iRemote
k *kind
@@ -11,12 +9,15 @@ type levels struct {
id string
}
func (l *levels) convertLevel(i float32) float32 {
if i > 0 {
val := 20 * math.Log10(float64(i))
return float32(roundFloat(float64(val), 1))
// returns true if any levels value for a strip/bus have been updated
func (l *levels) IsDirty() bool {
var vals []bool
if l.id == "strip" {
vals = _levelCache.stripComp[l.init : l.init+l.offset]
} else if l.id == "bus" {
vals = _levelCache.busComp[l.init : l.init+l.offset]
}
return -200.0
return !allTrue(vals, l.offset)
}
var _levelCache *levelCache