audio

package
v0.0.0-...-13e2eaa Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context interface {
	PlayerFor(url string) (Player, error)
}

func NewBeepContext

func NewBeepContext(logger util.Logger) (Context, error)

type Player

type Player interface {
	Playing() bool                    // Playing returns true if the player is currently playing.
	Play(callBack *func())            // Play sound.
	Loop(times int, callback *func()) // Loop the sound `times` number of times. times = -1: loop forever.
	Pause()                           // Pause or resume playback from previous pause.
	Stop()                            // Stop playback and reset transport.
	Close()                           // Close the player and underlying resources.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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