gapless

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: AGPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gapless finds albums whose songs run straight into each other, such as DJ mixes and live albums, so players leave no gap between them.

Files sometimes say so: iTunes' gapless flag, a MusicBrainz release type of DJ-mix or live, a genre or title like "DJ Mix" or "Mixed by". When they don't, the detector listens to where songs meet: on an album meant to play without gaps, the end of one song and the start of the next are still loud, where songs on other albums fade out or stop, and start from quiet. Getting it wrong costs little either way: songs that already end in silence keep it when played without gaps, and anyone can turn it on or off for an album.

Index

Constants

View Source
const Version = 1

Version goes up when the detector changes enough that albums it listened to should be listened to again.

Variables

This section is empty.

Functions

func Joined

func Joined(joins []bool) bool

Joined says whether enough of the places songs meet run on.

func Tagged

func Tagged(tags map[string]string, album string) bool

Tagged says whether a song's tags, or its album's title, say the album plays without gaps.

Types

type Detector

type Detector struct {
	Store  *store.Store
	FFmpeg string
	Prober probe.Prober
	Log    *slog.Logger
	// LowPriority is called with each FFmpeg's process id.
	LowPriority func(pid int)
	// contains filtered or unexported fields
}

Detector looks at albums and stores what it finds (see store.SetGaplessFound).

func (*Detector) Album

func (d *Detector) Album(ctx context.Context, a store.GaplessAlbum) (bool, error)

Album says whether an album's songs run into each other.

func (*Detector) Pass

func (d *Detector) Pass(ctx context.Context, next func(store.GaplessAlbum) bool) (int, error)

Pass looks at every album it hasn't looked at as its files are now. Before each one it calls next with the album, which returns false to stop the pass (paused, or shutting down). It returns how many albums it looked at.

Jump to

Keyboard shortcuts

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