audio

package
v0.0.0-...-c0736c2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func PlayAudioToEnd

func PlayAudioToEnd(ads types.AudioStream)

PlayAudioToEnd 音频播放(一次性使用,可并发,播放到完成,只能用于短音频)

Types

type Player

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

Player 音频播放

func NewPlayer

func NewPlayer(ctx *audio.Context) *Player

NewPlayer ...

func (*Player) Close

func (p *Player) Close()

Close 关闭音频播放

func (*Player) Pause

func (p *Player) Pause()

Pause 暂停音频播放

func (*Player) Play

func (p *Player) Play(ads types.AudioStream)

Play 音频播放(如果有正在播放的则跳过)

Jump to

Keyboard shortcuts

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