sound

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2020 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SoundEffectCache

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

SoundEffectCache retrieves audio samples stored as VOC files from a localizer and keeps them cached until they are invalidated.

func NewSoundCache

func NewSoundCache(localizer resource.Localizer) *SoundEffectCache

NewSoundCache returns a new instance.

func (*SoundEffectCache) Audio

func (cache *SoundEffectCache) Audio(key resource.Key) (audio.L8, error)

Audio retrieves and caches the underlying sound.

func (*SoundEffectCache) InvalidateResources

func (cache *SoundEffectCache) InvalidateResources(ids []resource.ID)

InvalidateResources lets the cache remove any sounds from resources that are specified in the given slice.

Jump to

Keyboard shortcuts

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