Documentation ¶
Index ¶
- Constants
- Variables
- func SongsUntagGain(list []*Song, songUpdateReceiver func(*Song)) error
- type Album
- type AudioFormat
- type GainType
- type Library
- func (l *Library) Albums() []*Album
- func (l *Library) GetAlbum(name string) *Album
- func (l *Library) ImportFromDir(dir string)
- func (l *Library) ImportSong(path string)
- func (l *Library) SetLoadFinishReceiver(rec func())
- func (l *Library) SetSongLoadReceiver(rec func(s *Song))
- func (l *Library) String() string
- func (l *Library) TaggedSongs() []*Song
- func (l *Library) UntaggedAlbums() []*Album
- type Song
- func (s *Song) AlbumName() string
- func (s *Song) Gain(t GainType) (ret string)
- func (s *Song) LoadGain(t GainType) (string, error)
- func (s *Song) Path() string
- func (s *Song) SetGain(g string, t GainType)
- func (s *Song) String() string
- func (s *Song) Title() string
- func (s *Song) Track() int
- func (s *Song) UntagGain(songUpdateReceiver func(*Song)) error
Constants ¶
View Source
const ( MP3_ASTR = "Recommended \"Album\" dB change: " MP3_TSTR = "Recommended \"Track\" dB change: " )
Variables ¶
View Source
var ErrUnknownFormat = errors.New("unknown audio format")
View Source
var ErrUnknownGainType = errors.New("unknown gain type")
Functions ¶
func SongsUntagGain ¶
Types ¶
type AudioFormat ¶
type AudioFormat int
TODO locks for gain
const ( UNKNOWN AudioFormat = iota MP3 OGG_VORBIS FLAC )
func GetPathAudioFormat ¶
func GetPathAudioFormat(path string) AudioFormat
GetPathAudioFormat() returns the audio format of the audio file located at path.
func (AudioFormat) String ¶
func (v AudioFormat) String() string
type Library ¶
type Library struct {
// contains filtered or unexported fields
}
func (*Library) ImportFromDir ¶
ImportFromDir() imports all songs in a directory, recursively.
func (*Library) ImportSong ¶
ImportSong() imports a single song into the library.
func (*Library) SetLoadFinishReceiver ¶
func (l *Library) SetLoadFinishReceiver(rec func())
func (*Library) SetSongLoadReceiver ¶
func (*Library) TaggedSongs ¶
func (*Library) UntaggedAlbums ¶
Click to show internal directories.
Click to hide internal directories.