player

package
v1.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Music

type Music struct {
	*beep.Ctrl
}

func (*Music) Start

func (m *Music) Start()

func (*Music) Stop

func (m *Music) Stop()

type Player

type Player struct {
	AudioPath  []string
	AudioIndex map[string][]int
	Buffer     *beep.Buffer
}

func NewPlayer

func NewPlayer(AudioPath []string) *Player

func NewPlayerByEmbed added in v1.1.6

func NewPlayerByEmbed(e embed.FS, AudioPath []string) *Player

NewPlayerByEmbed 通过嵌入mp3文件的方式初始化播放器

func (*Player) Play

func (p *Player) Play(name string) Music

Play 播放音乐,非阻塞

Jump to

Keyboard shortcuts

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