summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Utilities
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-15 21:04:18 +0000
committersr55 <[email protected]>2011-04-15 21:04:18 +0000
commita264b3c24c8ef687cac5325753be29f1b0f1d9f9 (patch)
tree318e69fb9ad0af00d2a2ae36c7b03d7f2d14c9af /win/CS/HandBrake.ApplicationServices/Utilities
parent70fee546acaf4db3efb690ac4aaa09e0f4cb65e8 (diff)
WinGui:
- Added "Advanced" audio options floating popup window. * This exposes a new Audio Gain Control (-20 to +20 dB) - Added support for (--gain=x,y,z) to the preset Loader. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3929 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
index 4d34ac937..62de5d6d6 100644
--- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
+++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryParserUtility.cs
@@ -98,6 +98,7 @@ namespace HandBrake.ApplicationServices.Utilities
Match audioBitrates = Regex.Match(input, @"-B ([0-9a-zA-Z,]*)"); // Auto = a-z
Match audioSampleRates = Regex.Match(input, @"-R ([0-9a-zA-Z.,]*)"); // Auto = a-z
Match drcValues = Regex.Match(input, @"-D ([0-9.,]*)");
+ Match gainValues = Regex.Match(input, @"--gain=([0-9.,-]*)");
// Chapters Tab
Match chapterMarkers = Regex.Match(input, @" -m");
@@ -338,6 +339,7 @@ namespace HandBrake.ApplicationServices.Utilities
string[] trackBitrates = null;
string[] trackSamplerates = null;
string[] trackDRCvalues = null;
+ string[] trackGainValues = null;
if (audioTracks.Success)
trackData = audioTracks.ToString().Replace("-a ", string.Empty).Split(',');
@@ -351,6 +353,8 @@ namespace HandBrake.ApplicationServices.Utilities
trackSamplerates = audioSampleRates.ToString().Replace("-R ", string.Empty).Split(',');
if (drcValues.Success)
trackDRCvalues = drcValues.ToString().Replace("-D ", string.Empty).Split(',');
+ if (gainValues.Success)
+ trackGainValues = gainValues.ToString().Replace("--gain=", string.Empty).Split(',');
// Create new Audio Track Classes and store them in the ArrayList
List<AudioTrack> allAudioTrackInfo = new List<AudioTrack>();
@@ -381,6 +385,10 @@ namespace HandBrake.ApplicationServices.Utilities
if (trackDRCvalues.Length >= (x + 1)) // Audio DRC Values
track.DRC = double.Parse(trackDRCvalues[x].Trim(), Culture);
+ if (trackGainValues != null)
+ if (trackGainValues.Length >= (x + 1)) // Audio DRC Values
+ track.Gain = int.Parse(trackGainValues[x].Trim());
+
allAudioTrackInfo.Add(track);
}