audio

package
v0.0.0-...-84ef37a Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FADE_TIME float64 = 1.0
View Source
const MUS_VOL_SCALE = 0.6
View Source
const PLAYERS_PER_SOUND = 8
View Source
const (
	SAMPLE_RATE = 44100
)

Variables

View Source
var MuteMusic bool
View Source
var MuteSfx bool

Functions

func PlayMusic

func PlayMusic(name string)

func PlaySound

func PlaySound(name string)

func PlaySoundAttenuated

func PlaySoundAttenuated(name string, factor float64, src *vmath.Vec2f, listenerMin, listenerMax *vmath.Vec2f)

Plays a sound that gets quieter the farther it is from the camera

func PlaySoundVolume

func PlaySoundVolume(name string, volume float64)

func Update

func Update(deltaTime float64)

Types

type FadeType

type FadeType int
const (
	FADE_NONE FadeType = iota
	FADE_IN
	FADE_OUT
)

Jump to

Keyboard shortcuts

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