From 1befa4f1a72a9e8b0277b4ff04b0200dd884f6bc Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 24 Mar 2012 16:17:04 +0000 Subject: 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 --- .../Utilities/QueryGeneratorUtility.cs | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs') 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 samplerates = new List(); List bitrates = new List(); List drcs = new List(); + List gains = new List(); // 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; -- cgit v1.2.3