diff options
Diffstat (limited to 'win/CS/Controls')
-rw-r--r-- | win/CS/Controls/AudioPanel.Designer.cs | 40 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.cs | 31 | ||||
-rw-r--r-- | win/CS/Controls/AudioPanel.resx | 11 |
3 files changed, 12 insertions, 70 deletions
diff --git a/win/CS/Controls/AudioPanel.Designer.cs b/win/CS/Controls/AudioPanel.Designer.cs index dd6dc768e..dbc1e84c9 100644 --- a/win/CS/Controls/AudioPanel.Designer.cs +++ b/win/CS/Controls/AudioPanel.Designer.cs @@ -35,7 +35,6 @@ namespace Handbrake.Controls private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
- System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AudioPanel));
this.audioMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.audioList_moveup = new System.Windows.Forms.ToolStripMenuItem();
this.audioList_movedown = new System.Windows.Forms.ToolStripMenuItem();
@@ -43,8 +42,6 @@ namespace Handbrake.Controls this.audioList_remove = new System.Windows.Forms.ToolStripMenuItem();
this.btn_RemoveAudioTrack = new System.Windows.Forms.Button();
this.btn_addAudioTrack = new System.Windows.Forms.Button();
- this.lbl_drc = new System.Windows.Forms.Label();
- this.tb_drc = new System.Windows.Forms.TrackBar();
this.label68 = new System.Windows.Forms.Label();
this.drp_audioEncoder = new System.Windows.Forms.ComboBox();
this.drp_audioMix = new System.Windows.Forms.ComboBox();
@@ -65,7 +62,6 @@ namespace Handbrake.Controls this.DRC = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Gain = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.audioMenu.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.audioList)).BeginInit();
this.SuspendLayout();
//
@@ -132,30 +128,6 @@ namespace Handbrake.Controls this.btn_addAudioTrack.UseVisualStyleBackColor = false;
this.btn_addAudioTrack.Click += new System.EventHandler(this.AddAudioTrack_Click);
//
- // lbl_drc
- //
- this.lbl_drc.AutoSize = true;
- this.lbl_drc.BackColor = System.Drawing.Color.Transparent;
- this.lbl_drc.Location = new System.Drawing.Point(666, 90);
- this.lbl_drc.Name = "lbl_drc";
- this.lbl_drc.Size = new System.Drawing.Size(13, 13);
- this.lbl_drc.TabIndex = 62;
- this.lbl_drc.Text = "0";
- //
- // tb_drc
- //
- this.tb_drc.BackColor = System.Drawing.SystemColors.Window;
- this.tb_drc.LargeChange = 0;
- this.tb_drc.Location = new System.Drawing.Point(608, 84);
- this.tb_drc.Margin = new System.Windows.Forms.Padding(0);
- this.tb_drc.Maximum = 31;
- this.tb_drc.Name = "tb_drc";
- this.tb_drc.Size = new System.Drawing.Size(57, 45);
- this.tb_drc.TabIndex = 60;
- this.tb_drc.TickFrequency = 10;
- this.ToolTips.SetToolTip(this.tb_drc, resources.GetString("tb_drc.ToolTip"));
- this.tb_drc.Scroll += new System.EventHandler(this.ControlChanged);
- //
// label68
//
this.label68.AutoSize = true;
@@ -321,9 +293,9 @@ namespace Handbrake.Controls this.btn_AdvancedAudio.BackColor = System.Drawing.Color.Transparent;
this.btn_AdvancedAudio.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_AdvancedAudio.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0)))));
- this.btn_AdvancedAudio.Location = new System.Drawing.Point(630, 38);
+ this.btn_AdvancedAudio.Location = new System.Drawing.Point(607, 86);
this.btn_AdvancedAudio.Name = "btn_AdvancedAudio";
- this.btn_AdvancedAudio.Size = new System.Drawing.Size(71, 23);
+ this.btn_AdvancedAudio.Size = new System.Drawing.Size(94, 23);
this.btn_AdvancedAudio.TabIndex = 70;
this.btn_AdvancedAudio.Text = "Advanced";
this.btn_AdvancedAudio.UseVisualStyleBackColor = false;
@@ -394,31 +366,29 @@ namespace Handbrake.Controls this.Gain.DataPropertyName = "Gain";
this.Gain.HeaderText = "Gain (dB)";
this.Gain.Name = "Gain";
+ this.Gain.ReadOnly = true;
this.Gain.Width = 60;
//
// AudioPanel
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.BackColor = System.Drawing.Color.Transparent;
- this.Controls.Add(this.btn_AdvancedAudio);
this.Controls.Add(this.label1);
this.Controls.Add(this.lbl_audioTrack);
this.Controls.Add(this.drp_audioTrack);
+ this.Controls.Add(this.btn_AdvancedAudio);
this.Controls.Add(this.drp_audioSample);
this.Controls.Add(this.audioList);
this.Controls.Add(this.label68);
this.Controls.Add(this.drp_audioBitrate);
this.Controls.Add(this.drp_audioMix);
this.Controls.Add(this.btn_addAudioTrack);
- this.Controls.Add(this.lbl_drc);
this.Controls.Add(this.btn_RemoveAudioTrack);
this.Controls.Add(this.drp_audioEncoder);
- this.Controls.Add(this.tb_drc);
this.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "AudioPanel";
this.Size = new System.Drawing.Size(720, 310);
this.audioMenu.ResumeLayout(false);
- ((System.ComponentModel.ISupportInitialize)(this.tb_drc)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.audioList)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -429,8 +399,6 @@ namespace Handbrake.Controls private System.Windows.Forms.Button btn_RemoveAudioTrack;
private System.Windows.Forms.Button btn_addAudioTrack;
- internal System.Windows.Forms.Label lbl_drc;
- internal System.Windows.Forms.TrackBar tb_drc;
internal System.Windows.Forms.Label label68;
internal System.Windows.Forms.ComboBox drp_audioEncoder;
internal System.Windows.Forms.ComboBox drp_audioMix;
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index ddd75d703..ed38c368f 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -230,11 +230,13 @@ namespace Handbrake.Controls // Configure the widgets with values
if (drp_audioEncoder.Text.Contains(AC3Passthru) || drp_audioEncoder.Text.Contains(DTSPassthru))
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = false;
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;
+ track.Gain = 0;
+ track.DRC = 0;
}
else
{
- drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = tb_drc.Enabled = true;
+ drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;
}
// Update an item in the Audio list if required.
@@ -259,17 +261,6 @@ namespace Handbrake.Controls track.Bitrate = bitrate;
break;
- case "tb_drc":
- double value;
- if (tb_drc.Value == 0) value = 0;
- else
- value = ((tb_drc.Value - 1) / 10.0) + 1;
-
- lbl_drc.Text = value.ToString();
- track.DRC = value;
- audioList.Select();
- audioList.Refresh();
- break;
}
audioList.Refresh();
@@ -303,14 +294,6 @@ namespace Handbrake.Controls drp_audioMix.SelectedItem = EnumHelper<Mixdown>.GetDescription(track.MixDown);
drp_audioSample.SelectedItem = track.SampleRate;
drp_audioBitrate.SelectedItem = track.Bitrate;
- double drcValue = 0;
- int drcCalculated;
- if (track.DRC != 0)
- drcValue = ((track.DRC * 10) + 1) - 10;
- int.TryParse(drcValue.ToString(Culture), out drcCalculated);
- tb_drc.Value = drcCalculated;
- lbl_drc.Text = track.DRC.ToString();
-
lbl_audioTrack.Text = track.SourceTrack;
// Set the Advanced Control.
@@ -349,10 +332,6 @@ namespace Handbrake.Controls }
// Get Some Values
- double drcValue = 0;
- if (tb_drc.Value != 0)
- drcValue = ((tb_drc.Value - 1) / 10.0) + 1;
-
int bitrate;
double samplerate;
@@ -368,7 +347,7 @@ namespace Handbrake.Controls SampleRate = samplerate,
Bitrate = bitrate,
Gain = 0,
- DRC = drcValue
+ DRC = 0,
};
this.audioTracks.Add(track);
diff --git a/win/CS/Controls/AudioPanel.resx b/win/CS/Controls/AudioPanel.resx index 483d3e97c..6b186fbc0 100644 --- a/win/CS/Controls/AudioPanel.resx +++ b/win/CS/Controls/AudioPanel.resx @@ -123,14 +123,6 @@ <metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>330, 16</value>
</metadata>
- <data name="tb_drc.ToolTip" xml:space="preserve">
- <value>Dynamic Range Compression
-Adjust the dynamic range of the output audio track.
-
-For source audio that has a wide dynamic range (very loud and very soft
-sequences), DRC allows you to 'compress' the range by making loud
-sections softer and soft sections louder</value>
- </data>
<metadata name="AudioMenuRowHeightHack.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 17</value>
</metadata>
@@ -155,4 +147,7 @@ sections softer and soft sections louder</value> <metadata name="Gain.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
+ <metadata name="ToolTips.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>330, 16</value>
+ </metadata>
</root>
\ No newline at end of file |