Documentation ¶
Index ¶
- func EnsureDirExists(path string) error
- func FileExists(filename string) bool
- func GetCurrentWindowProcessNames() ([]string, error)
- func Linux() bool
- func NormalizeScalar(v float32) float32
- func OpenExternal(logger *zap.SugaredLogger, cmd string, arg string) error
- func SetupCloseHandler() chan os.Signal
- func SignificantlyDifferent(old float32, new float32, noiseReductionLevel string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirExists ¶
EnsureDirExists creates the given directory path if it doesn't already exist
func FileExists ¶
FileExists checks if a file exists and is not a directory before we try using it to prevent further errors.
func GetCurrentWindowProcessNames ¶
GetCurrentWindowProcessNames returns the process names (including extension, if applicable) of the current foreground window. This includes child processes belonging to the window. This is currently only implemented for Windows
func NormalizeScalar ¶
NormalizeScalar "trims" the given float32 to 2 points of precision (e.g. 0.15442 -> 0.15) This is used both for windows core audio volume levels and for cleaning up slider level values from serial
func OpenExternal ¶
func OpenExternal(logger *zap.SugaredLogger, cmd string, arg string) error
OpenExternal spawns a detached window with the provided command and argument
func SetupCloseHandler ¶
SetupCloseHandler creates a 'listener' on a new goroutine which will notify the program if it receives an interrupt from the OS
Types ¶
This section is empty.