common

package
v0.0.0-...-c6416b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RetryMaxAttempts sets the maximum number of attempts when retrying
	RetryMaxAttempts = 10

	// RetryBackoffFactor sets the exponential backoff factor on wait duration
	RetryBackoffFactor = 2

	// RetryBackoffMax sets the maximum wait duration between retry attempts
	RetryBackoffMax = 10000 // milliseconds
)

Variables

This section is empty.

Functions

func BoolToInt

func BoolToInt(b types.BitBool) int

BoolToInt converts a boolean to an integer

func InitJackClient

func InitJackClient(name string, prc jack.PortRegistrationCallback, sc jack.ShutdownCallback, pc jack.ProcessCallback, preActivationMethod func(client *jack.Client), close bool) (*jack.Client, error)

InitJackClient creates a new JACK client

func Max

func Max(a, b int) int

Max returns the maximum of two integers

func RetryWithBackoff

func RetryWithBackoff(run func() error) error

RetryWithBackoff implements a retry-loop with an expontential backoff algorithm

func VolumeString

func VolumeString(vol int, mute types.BitBool) string

VolumeString returns a percentage string for volume controls

func WaitForJackd

func WaitForJackd() error

WaitForJackd is a jack_wait reimplementation

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL