audio

package
v0.0.0-...-7a6bf91 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sounds     map[string][]byte
	FileSystem = os.DirFS(".")
)

Functions

func GetPlayingPlayer

func GetPlayingPlayer(sound_path string) *audio.Player

func Init

func Init()

func LoadSoundPath

func LoadSoundPath(path string)

func Play

func Play(sound_path string)

func PlayAt

func PlayAt(sound_path string, x, y float64)

func PlayBytes

func PlayBytes(bytes []byte)

func PlayBytesAtPosition

func PlayBytesAtPosition(bytes []byte, x, y float64)

func SetCameraPos

func SetCameraPos(x, y float64)

func SetVolume

func SetVolume(volume float64)

Types

type MixedAudioPlayer

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

func NewMixedAudioPlayer

func NewMixedAudioPlayer(bytes []byte) *MixedAudioPlayer

func (MixedAudioPlayer) Play

func (player MixedAudioPlayer) Play()

func (MixedAudioPlayer) Rewind

func (player MixedAudioPlayer) Rewind()

func (MixedAudioPlayer) SetPosition

func (player MixedAudioPlayer) SetPosition(x, y float64)

type MixedAudioPlayerBackend

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

func (MixedAudioPlayerBackend) Play

func (player MixedAudioPlayerBackend) Play()

func (MixedAudioPlayerBackend) Rewind

func (player MixedAudioPlayerBackend) Rewind()

func (MixedAudioPlayerBackend) SetPosition

func (player MixedAudioPlayerBackend) SetPosition(x, y float64)

func (MixedAudioPlayerBackend) SetVolume

func (player MixedAudioPlayerBackend) SetVolume(volume float64)

Jump to

Keyboard shortcuts

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