audio

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package audio plays BGM and sound effects. It should stay focused on decoding, volume, and playback; gameplay decisions about which sound to trigger belong in game.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BGM

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

func NewBGM

func NewBGM(_ *res.Manager, _ bool, bgmVolume, sfxVolume float64, disabled bool) *BGM

func (*BGM) BGMVolume

func (b *BGM) BGMVolume() float64

func (*BGM) Enabled

func (b *BGM) Enabled() bool

func (*BGM) Play

func (b *BGM) Play(string) error

func (*BGM) PlayMap

func (b *BGM) PlayMap(string) (string, error)

func (*BGM) PlaySFX

func (b *BGM) PlaySFX(path string) (string, error)

func (*BGM) PlaySFXVolume

func (b *BGM) PlaySFXVolume(string, float64) (string, error)

func (*BGM) SFXVolume

func (b *BGM) SFXVolume() float64

func (*BGM) SetBGMVolume

func (b *BGM) SetBGMVolume(volume float64)

func (*BGM) SetEnabled

func (b *BGM) SetEnabled(bool)

func (*BGM) SetSFXVolume

func (b *BGM) SetSFXVolume(volume float64)

func (*BGM) SetVolume

func (b *BGM) SetVolume(volume float64)

func (*BGM) Stop

func (b *BGM) Stop()

func (*BGM) Volume

func (b *BGM) Volume() float64

Jump to

Keyboard shortcuts

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