From 01eb395b4c1fd805f8d418f4bd426e0a6afb24d9 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 2 Mar 2012 21:49:36 +0000 Subject: 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 --- .../Model/Encoding/AudioTrack.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'win/CS/HandBrake.ApplicationServices') 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 } /// - /// Gets the The UI display value for sample rate + /// Gets the The UI display value for sample rate /// 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; + } } /// -- cgit v1.2.3