Documentation ¶
Index ¶
Constants ¶
View Source
const ( Bell = "bell" Message = "message" )
Sound IDs.
View Source
const DefaultVolume = 0.6
DefaultVolume is the default volume of the sound player.
Variables ¶
View Source
var SoundsFS = []fs.FS{embeddedSoundsFS}
SoundsFS is a list of filesystems to search for sounds.
Functions ¶
func Play ¶
func Play(app *app.Application, id string)
Play plays the given sound ID. It first uses Canberra, falling back to ~/.cache/gotktrix/{id}.opus, then the embedded audio (if any), then display.Beep() otherwise.
Play is asynchronous; it returning does not mean the audio has successfully been played to the user.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.