mp3gain

package
v0.0.0-...-15592ba Latest Latest
Warning

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

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

Documentation

Overview

Package mp3gain uses the mp3gain program to analyze MP3s and compute gain adjustments.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeAlbum

func ComputeAlbum(paths []string) (map[string]Info, error)

ComputeAlbum uses mp3gain to compute gain adjustments for the specified MP3 files, all of which should be from the same album. Keys in the returned map are the supplied paths.

func SetInfoForTest

func SetInfoForTest(info *Info)

SetInfoForTest sets a hardcoded Info object to use instead of actually running the mp3gain program.

Types

type Info

type Info struct {
	// TrackGain is the track's dB gain adjustment independent of its album.
	TrackGain float64
	// AlbumGain is the album's dB gain adjustment.
	AlbumGain float64
	// PeakAmp is the peak amplitude of the song, with 1.0 being the maximum
	// amplitude playable without clipping.
	PeakAmp float64
}

Info contains information about gain adjustments for a song.

Jump to

Keyboard shortcuts

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