audio

package
v0.0.0-...-e1c21c9 Latest Latest
Warning

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

Go to latest
Published: May 10, 2019 License: Zlib Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultDecoderFactory = &decoderFactory{}

default Audio-File-Decoder

Functions

func AdvanceFrame

func AdvanceFrame()

func Destroy

func Destroy()

func EffectChannelVolume

func EffectChannelVolume(cid ChanId) (v float32, ok bool)

func EffectVolume

func EffectVolume() float32

Overall volume setting.

func Init

func Init() (err error)

func MusicVolume

func MusicVolume() float32

func NewVorbisDecoder

func NewVorbisDecoder(name string) (sine.Decoder, error)

func NewWavDecoder

func NewWavDecoder(name string) (sine.Decoder, error)

func PauseEffect

func PauseEffect(cid ChanId)

func PauseMusic

func PauseMusic()

func ResumeEffect

func ResumeEffect(cid ChanId)

func ResumeMusic

func ResumeMusic()

func SetEffectChannelVolume

func SetEffectChannelVolume(cid ChanId, v float32)

func SetEffectVolume

func SetEffectVolume(v float32)

func SetMusicVolume

func SetMusicVolume(v float32)

func StopEffect

func StopEffect(cid ChanId)

func StopMusic

func StopMusic()

Types

type ChanId

type ChanId int

func PlayEffect

func PlayEffect(id uint16, priority int) (cid ChanId)

type MusicPlayer

type MusicPlayer struct {
	*sine.StreamPlayer
}

func PlayMusic

func PlayMusic(id uint16) (sp MusicPlayer, ook bool)

type SourceComp

type SourceComp struct {
	// 音频资源
	Id uint16
	// 优先级
	P uint16

	// 静音
	Mute bool

	// 循环
	Loop bool

	// 音量 [0, 1]
	Volume float32
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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