summaryrefslogtreecommitdiffstats
path: root/win/CS
diff options
context:
space:
mode:
authorsr55 <[email protected]>2012-01-18 20:43:51 +0000
committersr55 <[email protected]>2012-01-18 20:43:51 +0000
commit24bad0ff777bb16926706c5b3712d622cc0ed81b (patch)
tree0883f123b7ffa9ef0af2fd7c53f271451ae9fd92 /win/CS
parent023c983ae5b65e3c0cd65d2aea3f17014fddbb24 (diff)
WinGui: Tweak the auto-correction of selected encoder feature on the audio panel so auto-passthru doesn't interfere with it.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4415 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r--win/CS/Controls/AudioPanel.cs65
1 files changed, 48 insertions, 17 deletions
diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs
index 8a976ab1a..fe7fab39f 100644
--- a/win/CS/Controls/AudioPanel.cs
+++ b/win/CS/Controls/AudioPanel.cs
@@ -1086,29 +1086,60 @@ namespace Handbrake.Controls
/// </returns>
private AudioEncoder GetCompatiblePassthru(AudioTrack track)
{
- if (track.ScannedTrack.Format.Contains("AC3") && this.check_ac3.Checked)
+ //
+ if (this.UserSettingService.GetUserSetting<bool>(UserSettingConstants.ShowAdvancedAudioPassthruOpts))
{
- return AudioEncoder.Ac3Passthrough;
- }
+ if (track.ScannedTrack.Format.Contains("AC3") && this.check_ac3.Checked)
+ {
+ return AudioEncoder.Ac3Passthrough;
+ }
- if (track.ScannedTrack.Format.Contains("DTS") && this.check_dts.Checked)
- {
- return AudioEncoder.DtsPassthrough;
- }
+ if (track.ScannedTrack.Format.Contains("DTS") && this.check_dts.Checked)
+ {
+ return AudioEncoder.DtsPassthrough;
+ }
- if (track.ScannedTrack.Format.Contains("DTS-HD") && this.check_dtshd.Checked)
- {
- return AudioEncoder.DtsPassthrough;
- }
+ if (track.ScannedTrack.Format.Contains("DTS-HD") && this.check_dtshd.Checked)
+ {
+ return AudioEncoder.DtsPassthrough;
+ }
- if (track.ScannedTrack.Format.Contains("aac") && this.check_aac.Checked)
- {
- return AudioEncoder.AacPassthru;
- }
+ if (track.ScannedTrack.Format.Contains("aac") && this.check_aac.Checked)
+ {
+ return AudioEncoder.AacPassthru;
+ }
- if (track.ScannedTrack.Format.Contains("mp3") && this.check_mp3.Checked)
+ if (track.ScannedTrack.Format.Contains("mp3") && this.check_mp3.Checked)
+ {
+ return AudioEncoder.Mp3Passthru;
+ }
+ }
+ else
{
- return AudioEncoder.Mp3Passthru;
+ if (track.ScannedTrack.Format.Contains("AC3"))
+ {
+ return AudioEncoder.Ac3Passthrough;
+ }
+
+ if (track.ScannedTrack.Format.Contains("DTS"))
+ {
+ return AudioEncoder.DtsPassthrough;
+ }
+
+ if (track.ScannedTrack.Format.Contains("DTS-HD"))
+ {
+ return AudioEncoder.DtsPassthrough;
+ }
+
+ if (track.ScannedTrack.Format.Contains("aac"))
+ {
+ return AudioEncoder.AacPassthru;
+ }
+
+ if (track.ScannedTrack.Format.Contains("mp3"))
+ {
+ return AudioEncoder.Mp3Passthru;
+ }
}
return EnumHelper<AudioEncoder>.GetValue(drp_passthruFallback.SelectedItem.ToString());