Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GroupedSound ¶
type GroupedSound struct {
// contains filtered or unexported fields
}
func (*GroupedSound) CheckGC ¶
func (g *GroupedSound) CheckGC() dontgc.State
CheckGC checks if GC is currently allowed. Grouped sounds may be GC'd only while not playing.
func (*GroupedSound) CurrentNotForGameplay ¶
func (g *GroupedSound) CurrentNotForGameplay() time.Duration
CurrentNotForGameplay returns the current playback position. As this may depend on hardware, do not use this for gameplay.
func (*GroupedSound) IsPlayingNotForGameplay ¶
func (g *GroupedSound) IsPlayingNotForGameplay() bool
IsPlayingNotForGameplay returns whether the sound is currently playing. As this may depend on hardware, do not use this for gameplay.
type Sound ¶
type Sound struct {
// contains filtered or unexported fields
}
Sound represents a sound effect.
func Load ¶
Load loads a sound effect. Multiple Load calls to the same sound effect return the same cached instance.
func (*Sound) DurationNotForGameplay ¶
DurationNotForGameplay returns how long a sound takes. As this may depend on hardware, do not use this for gameplay.
func (*Sound) Grouped ¶
func (s *Sound) Grouped() *GroupedSound
PlayGrouped starts the given sound effect in a grouped fashion.