Replay Gain -> vlc.Volume How?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
mmm777
New Cone
New Cone
Posts: 5
Joined: 18 Apr 2015 18:10

Replay Gain -> vlc.Volume How?

Postby mmm777 » 31 Aug 2016 01:36

ActiveX Control.

How convert a value of Replay Gain from a file - to a value volume of vlc control?
For example: Repaly Gain is 6.0 dB (Foobar 2000).
What should I set on VLC.Volume?

mmm777
New Cone
New Cone
Posts: 5
Joined: 18 Apr 2015 18:10

Re: Replay Gain -> vlc.Volume How?

Postby mmm777 » 15 Sep 2016 20:19

For now, my solution is below.
Value of ReplayGainCoefficient is obtained by trial and error.
Now much better than without ReplayGain; but I think this is too simple a way of calculation.

Code: Select all

public static class VolumeUtils { public static double ReplayGainCoefficient = 4.0 public static int DefaultLevel { get { return 100; } } // public static int MaxLevel { get { return 200; } } // public static int MinLevel { get { return 20; } } // public static int CalculateLevelAndReplayGain(double replayGain) { return Math.Min(Math.Max(MinLevel, DefaultLevel + (int)Math.Round((ReplayGainCoefficient * replayGain))), MaxLevel); }


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 13 guests