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?
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);
}
Users browsing this forum: No registered users and 10 guests