Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Context *audio.Context = audio.NewContext(SampleRate)
View Source
var SampleRate = 44100
Functions ¶
func NewBytes ¶
NewBytes is for short sounds: long audio file will make the game stutter. No returns closer since NewPlayerFromBytes needs no Closer: no any files are open.
func PlayEffect ¶
Types ¶
type SoundMap ¶
type SoundMap struct {
// contains filtered or unexported fields
}
func NewSoundMap ¶
func (SoundMap) Play ¶
func (s SoundMap) Register(path, key string) error { b, err := NewBytes(path) if err != nil { return err } if key == "" { key = filepath.Base(path) } s.bytes[key] = b // s.Closers = append(s.Closers, closer) return nil }
func (SoundMap) PlayWithVolume ¶
Click to show internal directories.
Click to hide internal directories.