From a264b3c24c8ef687cac5325753be29f1b0f1d9f9 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 15 Apr 2011 21:04:18 +0000 Subject: 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 --- win/CS/Controls/AudioPanel.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'win/CS/Controls/AudioPanel.cs') diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index d569a1f6a..ddd75d703 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -18,6 +18,8 @@ namespace Handbrake.Controls using HandBrake.ApplicationServices.Parsing; using HandBrake.ApplicationServices.Utilities; + using Handbrake.ToolWindows; + using AudioTrack = HandBrake.ApplicationServices.Model.Encoding.AudioTrack; /// @@ -33,6 +35,7 @@ namespace Handbrake.Controls private static readonly CultureInfo Culture = new CultureInfo("en-US", false); private const string AC3Passthru = "AC3 Passthru"; private const string DTSPassthru = "DTS Passthru"; + AdvancedAudio advancedAudio = new AdvancedAudio(); private readonly BindingList audioTracks = new BindingList(); @@ -50,6 +53,8 @@ namespace Handbrake.Controls drp_audioMix.SelectedItem = "Dolby Pro Logic II"; drp_audioSample.SelectedIndex = 1; + + } /// @@ -307,10 +312,15 @@ namespace Handbrake.Controls lbl_drc.Text = track.DRC.ToString(); lbl_audioTrack.Text = track.SourceTrack; + + // Set the Advanced Control. + if (!advancedAudio.IsDisposed) + advancedAudio.Track = track; } } else lbl_audioTrack.Text = "(Click \"Add Track\" to add)"; + } #endregion @@ -691,5 +701,17 @@ namespace Handbrake.Controls } #endregion + + private void btn_AdvancedAudio_Click(object sender, EventArgs e) + { + if (advancedAudio.IsDisposed) + { + advancedAudio = new AdvancedAudio { Track = this.audioList.SelectedRows[0].DataBoundItem as AudioTrack }; + } + + advancedAudio.Show(); + } + + } } \ No newline at end of file -- cgit v1.2.3