utils

package
v0.0.0-...-e340b1f Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPort = 42170

Variables

This section is empty.

Functions

func CenterArray

func CenterArray(arr []float64, total int) []float64

func CheckErr

func CheckErr(err error)

func Chunk

func Chunk(data []float64, desiredChunks int) [][]float64

func ChunkedMean

func ChunkedMean(data []float64, desiredChunks int) []float64

func GetSQNR

func GetSQNR(bits int) float64

func GetUDPAddr

func GetUDPAddr(host string, port uint16) (*net.UDPAddr, error)

func GetUDPConn

func GetUDPConn(host string, port uint16) *net.UDPConn

Types

type FlagsResult

type FlagsResult struct {
	Host string
	Port uint16

	LedCount int
	FftSize  int

	SampleRate int
	Channels   int

	Decay         float64
	DbfsThreshold float64

	Backend string
	Device  string

	AudibleLow  float64
	AudibleHigh float64

	Mirror bool
	Effect string

	Color color.RGBA

	Verbose bool
}

func GetFlags

func GetFlags() FlagsResult

type Pinger

type Pinger struct {
	IsReachable bool
	// contains filtered or unexported fields
}

func NewPinger

func NewPinger(conn *net.UDPConn, interval time.Duration, verbose bool) *Pinger

Jump to

Keyboard shortcuts

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