Documentation ¶
Index ¶
- Variables
- type AudioManagerStruct
- func (a *AudioManagerStruct) FadeOut(fadeout uint32)
- func (a *AudioManagerStruct) MasterGain() float32
- func (a *AudioManagerStruct) MusicGain() float32
- func (a *AudioManagerStruct) PlayMusic(samples *snd.Samples, fadein uint32, loop bool)
- func (a *AudioManagerStruct) PlayMusicFromPath(path string, fadein uint32, loop bool)
- func (a AudioManagerStruct) PlaySample(name string, gain float32)
- func (a *AudioManagerStruct) SamplesGain() float32
- func (a *AudioManagerStruct) SetMasterGain(gain float32)
- func (a *AudioManagerStruct) SetMaxSamples(max int)
- func (a *AudioManagerStruct) SetMusicGain(gain float32)
- func (a *AudioManagerStruct) SetSamplesGain(gain float32)
- type Fader
- func (f *Fader) FadeIn(samples uint32)
- func (f *Fader) FadeOut(samples uint32)
- func (f *Fader) Read(samples *snd.Samples)
- func (f *Fader) ReadStateless(samples *snd.Samples, freq float32, state *snd.NoteState)
- func (f *Fader) SetLoop(loop bool)
- func (f *Fader) SetOn(on bool)
- func (f *Fader) SetReadable(r snd.Readable)
- type Mp3Streamer
- type ResourceManagerStruct
- func (r *ResourceManagerStruct) CreateMp3Streamer(path string) (*Mp3Streamer, error)
- func (r *ResourceManagerStruct) HasSample(path string) bool
- func (r *ResourceManagerStruct) LoadPicture(path string) (pixel.Picture, error)
- func (r *ResourceManagerStruct) LoadSample(path string) (*snd.Samples, error)
- func (r *ResourceManagerStruct) LoadTTF(path string, size float64) (font.Face, error)
- func (r *ResourceManagerStruct) SetBasePath(basepath string)
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 (*Fader) ReadStateless ¶
func (*Fader) SetReadable ¶
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 ¶
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) SetBasePath ¶
func (r *ResourceManagerStruct) SetBasePath(basepath string)
Click to show internal directories.
Click to hide internal directories.