summaryrefslogtreecommitdiffstats
path: root/win/C#
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-02-06 22:02:23 +0000
committersr55 <[email protected]>2009-02-06 22:02:23 +0000
commitc33b94692d6d9c7a609ace7cdb91da937de67775 (patch)
tree476cae4ae319d762f914157273d898ba24e8bd6e /win/C#
parentadd744cb78cc588be94e29b61722e41627d2f9a4 (diff)
WinGui:
- Implement DRC 0, default 0 - Tidy up audio query generation a bit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2127 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#')
-rw-r--r--win/C#/frmMain.Designer.cs4
-rw-r--r--win/C#/frmMain.cs11
-rw-r--r--win/C#/frmMain/QueryGenerator.cs15
3 files changed, 21 insertions, 9 deletions
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs
index 85ccfd444..89647c884 100644
--- a/win/C#/frmMain.Designer.cs
+++ b/win/C#/frmMain.Designer.cs
@@ -1709,7 +1709,7 @@ namespace Handbrake
this.lbl_drc.Name = "lbl_drc";
this.lbl_drc.Size = new System.Drawing.Size(14, 13);
this.lbl_drc.TabIndex = 15;
- this.lbl_drc.Text = "1";
+ this.lbl_drc.Text = "0";
//
// label16
//
@@ -1727,7 +1727,7 @@ namespace Handbrake
this.tb_drc.LargeChange = 0;
this.tb_drc.Location = new System.Drawing.Point(599, 47);
this.tb_drc.Margin = new System.Windows.Forms.Padding(0);
- this.tb_drc.Maximum = 30;
+ this.tb_drc.Maximum = 31;
this.tb_drc.Name = "tb_drc";
this.tb_drc.Size = new System.Drawing.Size(50, 42);
this.tb_drc.TabIndex = 13;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs
index 3c77a8d1a..98d99f4a0 100644
--- a/win/C#/frmMain.cs
+++ b/win/C#/frmMain.cs
@@ -1283,7 +1283,11 @@ namespace Handbrake
}
private void tb_drc_Scroll(object sender, EventArgs e)
{
- double value = (tb_drc.Value / 10.0) + 1;
+ double value;
+ if (tb_drc.Value == 0) value = 0;
+ else
+ value = ((tb_drc.Value-1) / 10.0) + 1;
+
lbl_drc.Text = value.ToString();
// Update an item in the Audio list if required.
@@ -1388,7 +1392,9 @@ namespace Handbrake
drp_audbit_1.Text = lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[4].Text;
double drcValue; int drcCalculated;
double.TryParse(lv_audioList.Items[lv_audioList.SelectedIndices[0]].SubItems[5].Text, out drcValue);
- drcValue = (drcValue * 10) - 10;
+ if (drcValue == 0) drcCalculated = 0;
+ else
+ drcValue = ((drcValue * 10)+1) -10;
int.TryParse(drcValue.ToString(), out drcCalculated);
tb_drc.Value = drcCalculated;
}
@@ -2091,6 +2097,7 @@ namespace Handbrake
#endregion
+
// This is the END of the road ------------------------------------------------------------------------------
}
} \ No newline at end of file
diff --git a/win/C#/frmMain/QueryGenerator.cs b/win/C#/frmMain/QueryGenerator.cs
index 8d77dfcb8..738bb2503 100644
--- a/win/C#/frmMain/QueryGenerator.cs
+++ b/win/C#/frmMain/QueryGenerator.cs
@@ -295,7 +295,8 @@ namespace Handbrake
else
audioItems += "," + item;
}
- query += " -E " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -E " + audioItems;
firstLoop = true; audioItems = ""; // Reset for another pass.
// Audio Mixdown (-6)
@@ -308,7 +309,8 @@ namespace Handbrake
else
audioItems += "," + item;
}
- query += " -6 " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -6 " + audioItems;
firstLoop = true; audioItems = ""; // Reset for another pass.
// Sample Rate (-R)
@@ -321,7 +323,8 @@ namespace Handbrake
else
audioItems += "," + item;
}
- query += " -R " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -R " + audioItems;
firstLoop = true; audioItems = ""; // Reset for another pass.
// Audio Bitrate (-B)
@@ -334,7 +337,8 @@ namespace Handbrake
else
audioItems += "," + item;
}
- query += " -B " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -B " + audioItems;
firstLoop = true; audioItems = ""; // Reset for another pass.
// DRC (-D)
@@ -347,7 +351,8 @@ namespace Handbrake
else
audioItems += "," + item;
}
- query += " -D " + audioItems;
+ if (audioItems.Trim() != String.Empty)
+ query += " -D " + audioItems;
// Subtitles
string subtitles = mainWindow.drp_subtitle.Text;