audio

package
v0.0.0-...-50c553c Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MUSIC_STOPPED = 0
	MUSIC_PLAYING = 1
	MUSIC_STALLED = 2
	MUSIC_PAUSED  = 3
)

Variables

View Source
var MapSamples [3][5]map[int]*Sample
View Source
var Samples [3][5]*Sample

Functions

func Init

func Init()

func LoadBeatmapSamples

func LoadBeatmapSamples(dir string)

func LoadSamples

func LoadSamples()

func PlaySample

func PlaySample(sampleSet, additionSet, hitsound, index int, volume float64)

func PlaySliderTick

func PlaySliderTick(sampleSet, index int, volume float64)

Types

type Callback

type Callback func()

type Music

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

func NewMusic

func NewMusic(path string) *Music

func (*Music) GetBeat

func (wv *Music) GetBeat() float64

func (*Music) GetFFT

func (wv *Music) GetFFT() []float32

func (*Music) GetLength

func (wv *Music) GetLength() float64

func (*Music) GetPeak

func (wv *Music) GetPeak() float64

func (*Music) GetPosition

func (wv *Music) GetPosition() float64

func (*Music) GetState

func (wv *Music) GetState() int

func (*Music) Pause

func (wv *Music) Pause()

func (*Music) Play

func (wv *Music) Play()

func (*Music) PlayV

func (wv *Music) PlayV(volume float64)

func (*Music) RegisterCallback

func (wv *Music) RegisterCallback(f func())

func (*Music) Resume

func (wv *Music) Resume()

func (*Music) SetPitch

func (wv *Music) SetPitch(tempo float64)

func (*Music) SetPosition

func (wv *Music) SetPosition(pos float64)

func (*Music) SetTempo

func (wv *Music) SetTempo(tempo float64)

func (*Music) SetVolume

func (wv *Music) SetVolume(vol float64)

func (*Music) SetVolumeRelative

func (wv *Music) SetVolumeRelative(vol float64)

func (*Music) Stop

func (wv *Music) Stop()

func (*Music) UnregisterCallback

func (wv *Music) UnregisterCallback(f func())

func (*Music) Update

func (wv *Music) Update()

type Sample

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

func NewSample

func NewSample(path string) *Sample

func (*Sample) Play

func (wv *Sample) Play()

func (*Sample) PlayRV

func (wv *Sample) PlayRV(volume float64)

func (*Sample) PlayV

func (wv *Sample) PlayV(volume float64)

Jump to

Keyboard shortcuts

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