Documentation
¶
Overview ¶
Package audioplayer controls the audio.
Package audioplayer the audio.
Index ¶
- Variables
- func Addsong(track globals.Track)
- func Clear()
- func Close()
- func Deletesong(index int)
- func GetMediaPosition() (float32, error)
- func GetPlaying() globals.Track
- func GetPlaytime() (time.Duration, time.Duration)
- func Initialize()
- func Insertsong(track globals.Track)
- func MoveDown(index int)
- func MoveUp(index int)
- func Nextsong()
- func PlaySong(index int)
- func Previoussong()
- func SetMediaPosition(percentage float32)
- func Shuffle()
Constants ¶
This section is empty.
Variables ¶
var ( WillPlay func() bool IsPlaying func() bool )
var ( Playlist = make([]globals.Track, 0) Songindex = 0 // the index of the currently playing track TogglePause func() error Stop func() error SetPause func(bool) error )
global variables
Functions ¶
func Deletesong ¶
func Deletesong(index int)
Deletesong removes the currently selected song from the playlist.
func GetMediaPosition ¶
GetMediaPosition returns media position as a float percentage between 0.0 and 1.0.
func GetPlaying ¶
GetPlaying returns that is currently selected in the playlist if there is no such track second returned value is false
func GetPlaytime ¶
GetPlaytime returns the play time, and the total time of the track. If no track is playing the returned timings will be zero.
func Initialize ¶
func Initialize()
Initialize the speaker with the specification defined at the top.
func Insertsong ¶
Insertsong inserts a song into the playlist directly after the song that is currently playing.
func MoveDown ¶
func MoveDown(index int)
MoveDown swaps the currently selected track in the playlist with the one below it.
func MoveUp ¶
func MoveUp(index int)
MoveUp swaps the currently selected track in the playlist with the one above it.
func SetMediaPosition ¶
func SetMediaPosition(percentage float32)
SetMediaPosition sets media position as percentage between 0.0 and 1.0. Some formats and protocols do not support this.
Types ¶
This section is empty.