audio

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

internal/audio/player.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PlayableNote

type PlayableNote struct {
	Frequency float64
	Start     time.Duration
	Duration  time.Duration
	Volume    float64
	String    int
	Position  int
}

type Player

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

func NewPlayer

func NewPlayer() *Player

func (*Player) GetHighlighted

func (p *Player) GetHighlighted() []models.Position

func (*Player) GetPlaybackInfo

func (p *Player) GetPlaybackInfo() (position int, totalLength int, isPlaying bool)

func (*Player) GetPosition

func (p *Player) GetPosition() int

func (*Player) IsPlaying

func (p *Player) IsPlaying() bool

func (*Player) PlayTab

func (p *Player) PlayTab(tab *models.Tab) error

func (*Player) SetTempo

func (p *Player) SetTempo(tempo int)

SetTempo allows changing playback tempo

func (*Player) Stop

func (p *Player) Stop()

Jump to

Keyboard shortcuts

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