Repository navigation
✨ Write ReplayGain values through a typed API - #28
Merged
Merged
Conversation
…ain and RemoveReplayGain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Plan 093, with design decisions D1–D5 as recommended.
File.SetTrackReplayGain(gain, peak),File.SetAlbumReplayGain(gain, peak),File.RemoveReplayGain()and the newErrInvalidReplayGain.Audio.ReplayGainreports. A peak of 0 means unknown and removes a stored peak. There are separate methods becauseReplayGainInfo's "zero is unknown" rule can't express a 0.00 dB gain.REPLAYGAIN_*tags formatted as rsgain writes them ("-6.50 dB","0.988525"). A tag the file already holds keeps its stored spelling; a new one is written in upper case.R128_TRACK_GAIN/R128_ALBUM_GAIN(Q7.8, gain − 5 dB, rounded half away from zero, refused outside int16). Peaks are not stored. AnyREPLAYGAIN_*tags are removed (RFC 7845 §5.2.1). The header output gain is never touched.f.Tagsimmediately.Audio.ReplayGainreports the stored values until the file is reopened.internal/replaygainnext to the reader, sharing its key constants. No writer changed: the existing raw-key write path handles every format.Tests:
REPLAYGAIN_*;TestWriteOracleedit (ffprobe, ffmpeg, flac; opusinfo and ogginfo in CI);ExampleFile_SetTrackReplayGain.mise run cipasses locally.