panning

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2021 License: Unlicense Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// CenterAhead is the position directly ahead of the listener
	CenterAhead = MakeStereoPosition(0.5, 0, 1)
)

Functions

func FromStereoPosition

func FromStereoPosition(pos Position, leftValue float32, rightValue float32) float32

FromStereoPosition inverts a stereo panning position into a linear interpolation value between `leftValue` and `RightValue`

Types

type Position

type Position struct {
	Angle    float32
	Distance float32
}

Position is stored as polar coordinates with Angle of 0 radians being calculated from right and >0 rotating counter-clockwise from that point

func MakeStereoPosition

func MakeStereoPosition(value float32, leftValue float32, rightValue float32) Position

MakeStereoPosition creates a stereo panning position based on a linear interpolation between `leftValue` and `RightValue`

Jump to

Keyboard shortcuts

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