sound

package
v1.0.0-alpha.124 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Precache

func Precache() error

Types

type Sound

type Sound struct {
	// contains filtered or unexported fields
}

Sound represents a sound effect.

func Load

func Load(name string) (*Sound, error)

Load loads a sound effect. Multiple Load calls to the same sound effect return the same cached instance.

func (*Sound) Play

func (s *Sound) Play() *audiowrap.Player

Play plays the given sound effect.

func (*Sound) PlayAtVolume

func (s *Sound) PlayAtVolume(vol float64) *audiowrap.Player

PlayAtVolume plays the given sound effect at the given volume.

Jump to

Keyboard shortcuts

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