0

Below is the code to get gain and peak.

TrackGain trackGain = new TrackGain(44100, 16);
foreach (sampleSet in track) {
trackGain.AnalyzeSamples(leftSamples, rightSamples)
}
double gain = trackGain.GetGain();
double peak = trackGain.GetPeak();

Let's say I get gain of 5.34 and peak of 1.33

How can I determine the volume adjustment that I need to make for that track? A formula to determine would be great.

  • Can you provide a link to the documentation of the software you are using ? – audionuma Mar 16 at 16:36
0

Replay Gain recommends a target loudness of 89 dB sound pressure level. So, using an available library like nReplayGain to determine the gain needs to be adjusted to our custom target loudness.

So, if we want to target 92.8 dB we add 3.8 dB to the gain that we computed for our track.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.