diff options
author | sr55 <[email protected]> | 2012-03-24 16:17:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-24 16:17:04 +0000 |
commit | 1befa4f1a72a9e8b0277b4ff04b0200dd884f6bc (patch) | |
tree | da3b0dbfd3c474dc8075b569a9d688051c70ca91 /win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | |
parent | 1732654a808c3b0326dd475217abbbe6908cc015 (diff) |
WinGui: (WPF) Fixes to the Audio and Subtitle panels. Add pdb's to installer.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4532 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index d46296244..bbcb9c4f7 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -477,6 +477,7 @@ namespace HandBrake.ApplicationServices.Utilities List<double> samplerates = new List<double>();
List<int> bitrates = new List<int>();
List<double> drcs = new List<double>();
+ List<double> gains = new List<double>();
// No Audio
if (audioTracks.Count == 0)
@@ -506,6 +507,9 @@ namespace HandBrake.ApplicationServices.Utilities // DRC (-D)
drcs.Add(track.DRC);
+
+ // Gain (--gain)
+ gains.Add(track.Gain);
}
// Audio Track (-a)
@@ -606,8 +610,26 @@ namespace HandBrake.ApplicationServices.Utilities if (audioItems.Trim() != String.Empty)
query += " -D " + audioItems;
+ audioItems = string.Empty; // Reset for another pass.
+ firstLoop = true;
+
+ // Gain (--gain)
+ foreach (var itm in gains)
+ {
+ string item = itm.ToString(new CultureInfo("en-US"));
+ if (firstLoop)
+ {
+ audioItems = item;
+ firstLoop = false;
+ }
+ else
+ audioItems += "," + item;
+ }
+ if (audioItems.Trim() != String.Empty)
+ query += " --gain " + audioItems;
+
// Passthru Settings
- if (task.AllowedPassthruOptions != null)
+ if (task.AllowedPassthruOptions != null && task.AllowedPassthruOptions.IsEnabled)
{
string fallbackEncoders = string.Empty;
|