player

package module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: BSD-3-Clause Imports: 5 Imported by: 0

README

JAPlayer

Player multiplataforma para as músicas no banco de dados do LouvorJA.

Ainda em fase de protótipo

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseTime

func ParseTime(num int) time.Duration

Types

type AudioPlayer

type AudioPlayer interface {
	LoadAudio(audiofile string) error
	Play() error
	// Pause() error
	// Seek(time time.Duration)
	Wait()
}

type Display

type Display interface {
	ShowVerse(lines ...string) error
	ShowTitle(title string) error
	SetBackgroundImage(filename string) error
}

type EventHandler

type EventHandler struct {
	Quit func()
}

type Player

type Player struct {
	SongLoader  SongLoader
	Display     Display
	AudioPlayer AudioPlayer

	ImagesDir string
	MusicDir  string
	// contains filtered or unexported fields
}

func (*Player) PresentLyrics

func (p *Player) PresentLyrics(hymnNumber int) error

func (*Player) Stop

func (p *Player) Stop()

type Song

type Song struct {
	Title      string
	CoverImage string
	Verses     []Verse
}

type SongLoader

type SongLoader interface {
	AlbumTrack(albumID, track int) (Song, error)
	SongByID(id string) (Song, error)
}

type Verse

type Verse struct {
	Text string
	Time time.Duration
}

Directories

Path Synopsis
adapters
sdl

Jump to

Keyboard shortcuts

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