services

package
v0.0.0-...-1d09ed4 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: MIT Imports: 20 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadAsync bool = true

LoadAsync controls whether sound samples are loaded asynchronously in the background. After the first 44000 frames a goroutine is spawned to load the rest.

Functions

This section is empty.

Types

type AudioManagerStruct

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

func AudioManager

func AudioManager() *AudioManagerStruct

func (*AudioManagerStruct) FadeOut

func (a *AudioManagerStruct) FadeOut(fadeout uint32)

func (*AudioManagerStruct) MasterGain

func (a *AudioManagerStruct) MasterGain() float32

func (*AudioManagerStruct) MusicGain

func (a *AudioManagerStruct) MusicGain() float32

func (*AudioManagerStruct) PlayMusic

func (a *AudioManagerStruct) PlayMusic(samples *snd.Samples, fadein uint32, loop bool)

func (*AudioManagerStruct) PlayMusicFromPath

func (a *AudioManagerStruct) PlayMusicFromPath(path string, fadein uint32, loop bool)

func (AudioManagerStruct) PlaySample

func (a AudioManagerStruct) PlaySample(name string, gain float32)

func (*AudioManagerStruct) SamplesGain

func (a *AudioManagerStruct) SamplesGain() float32

func (*AudioManagerStruct) SetMasterGain

func (a *AudioManagerStruct) SetMasterGain(gain float32)

func (*AudioManagerStruct) SetMaxSamples

func (a *AudioManagerStruct) SetMaxSamples(max int)

func (*AudioManagerStruct) SetMusicGain

func (a *AudioManagerStruct) SetMusicGain(gain float32)

func (*AudioManagerStruct) SetSamplesGain

func (a *AudioManagerStruct) SetSamplesGain(gain float32)

type Fader

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

func NewFader

func NewFader() *Fader

func (*Fader) FadeIn

func (f *Fader) FadeIn(samples uint32)

func (*Fader) FadeOut

func (f *Fader) FadeOut(samples uint32)

func (*Fader) Read

func (f *Fader) Read(samples *snd.Samples)

func (*Fader) ReadStateless

func (f *Fader) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)

func (*Fader) SetLoop

func (f *Fader) SetLoop(loop bool)

func (*Fader) SetOn

func (f *Fader) SetOn(on bool)

func (*Fader) SetReadable

func (f *Fader) SetReadable(r snd.Readable)

type Mp3Streamer

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

func NewMp3Streamer

func NewMp3Streamer(buf []byte, path string) *Mp3Streamer

func (*Mp3Streamer) NoteEnded

func (m *Mp3Streamer) NoteEnded() bool

func (*Mp3Streamer) Read

func (m *Mp3Streamer) Read(samples *snd.Samples)

func (*Mp3Streamer) ReadStateless

func (m *Mp3Streamer) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)

type ResourceManagerStruct

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

func ResourceManager

func ResourceManager() *ResourceManagerStruct

func (*ResourceManagerStruct) CreateMp3Streamer

func (r *ResourceManagerStruct) CreateMp3Streamer(path string) (*Mp3Streamer, error)

func (*ResourceManagerStruct) HasSample

func (r *ResourceManagerStruct) HasSample(path string) bool

func (*ResourceManagerStruct) LoadPicture

func (r *ResourceManagerStruct) LoadPicture(path string) (pixel.Picture, error)

func (*ResourceManagerStruct) LoadSample

func (r *ResourceManagerStruct) LoadSample(path string) (*snd.Samples, error)

func (*ResourceManagerStruct) LoadTTF

func (r *ResourceManagerStruct) LoadTTF(path string, size float64) (font.Face, error)

func (*ResourceManagerStruct) SetBasePath

func (r *ResourceManagerStruct) SetBasePath(basepath string)

Jump to

Keyboard shortcuts

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