summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-03-02 21:49:36 +0000
committersr55 <[email protected]>2012-03-02 21:49:36 +0000
commit01eb395b4c1fd805f8d418f4bd426e0a6afb24d9 (patch)
tree30d57c7239eb37db7611677fbb40caa416cf16af /win/CS/HandBrake.ApplicationServices
parent97db041ea7b41fcebb146d8fbcb28dd99a373d9c (diff)
WinGui: (WPF) Audio Panel work to support presets / automatic track selection.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4484 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
index 174273e37..d7e3941bb 100644
--- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
+++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs
@@ -255,7 +255,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding
}
/// <summary>
- /// Gets the The UI display value for sample rate
+ /// Gets the The UI display value for sample rate
/// </summary>
public string SampleRateDisplayValue
{
@@ -263,6 +263,19 @@ namespace HandBrake.ApplicationServices.Model.Encoding
{
return this.SampleRate == 0 ? "Auto" : this.SampleRate.ToString(CultureInfo.InvariantCulture);
}
+ set
+ {
+ // TODO change this to be a converted field
+ if (string.IsNullOrEmpty(value))
+ {
+ return;
+ }
+
+ double samplerate;
+ double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out samplerate);
+
+ this.SampleRate = samplerate;
+ }
}
/// <summary>