diff options
author | sr55 <[email protected]> | 2012-09-08 18:16:46 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-09-08 18:16:46 +0000 |
commit | 8bdaf62855e06248bdf4c4d5b22d9051f092ad27 (patch) | |
tree | 5f5ed82a17af2a8c7bb3ee4de1b6096ae08c691c /win | |
parent | c85b8f5df78f90b0e4f4b5f9295bce48e3c9703b (diff) |
WinGui: Couple Corrections to the Audiobitrate converter.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4941 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
3 files changed, 7 insertions, 14 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs index fedeb275f..830cea25e 100644 --- a/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs +++ b/win/CS/HandBrake.ApplicationServices/Model/Encoding/AudioTrack.cs @@ -338,7 +338,7 @@ namespace HandBrake.ApplicationServices.Model.Encoding /// <summary>
/// Gets a value indicating whether can set bitrate.
/// </summary>
- public bool CanSetBitrate
+ public bool CannotSetBitrate
{
get
{
diff --git a/win/CS/HandBrakeWPF/Converters/Audio/AudioBitrateConverter.cs b/win/CS/HandBrakeWPF/Converters/Audio/AudioBitrateConverter.cs index 28bbf81ac..f4e805957 100644 --- a/win/CS/HandBrakeWPF/Converters/Audio/AudioBitrateConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Audio/AudioBitrateConverter.cs @@ -80,26 +80,19 @@ namespace HandBrakeWPF.Converters.Audio break;
case AudioEncoder.ffaac:
low = ((channels + lfeCount) * 32);
- max = ((channels + lfeCount) *
- ((192 + (64 * ((samplerate << srShift) >= 44100 ? 1 : 0)))
- >> srShift));
+ max = ((channels + lfeCount) * ((192 + (64 * ((samplerate << srShift) >= 44100 ? 1 : 0))) >> srShift));
break;
case AudioEncoder.Lame:
low = 8 + (24 * (srShift < 1 ? 1 : 0) );
max = 64 + (96 * (srShift < 2 ? 1 : 0)) + (160 * (srShift < 1 ? 1 : 0));
break;
case AudioEncoder.Vorbis:
- low = (channels + lfeCount) * (14 +
- (8 * (srShift < 2 ? 1 : 0)) +
- (6 * (srShift < 1 ? 1 : 0)));
- max = (channels + lfeCount) * (32 +
- (54 * (srShift < 2 ? 1 : 0)) +
- (104 * (srShift < 1 ? 1 : 0)) +
- (50 * (samplerate >= 44100 ? 1 : 0)));
+ low = (channels + lfeCount) * (14 + (8 * (srShift < 2 ? 1 : 0)) + (6 * (srShift < 1 ? 1 : 0)));
+ max = (channels + lfeCount) * (32 + (54 * (srShift < 2 ? 1 : 0)) + (104 * (srShift < 1 ? 1 : 0)) + (50 * (samplerate >= 44100 ? 1 : 0)));
break;
case AudioEncoder.Ac3:
low = 224 * channels / 5;
- max = samplerate > 24 ? 640 : 320;
+ max = 640;
break;
case AudioEncoder.Ac3Passthrough:
case AudioEncoder.DtsPassthrough:
diff --git a/win/CS/HandBrakeWPF/Views/AudioView.xaml b/win/CS/HandBrakeWPF/Views/AudioView.xaml index 2f8d0d8e3..d90e5643f 100644 --- a/win/CS/HandBrakeWPF/Views/AudioView.xaml +++ b/win/CS/HandBrakeWPF/Views/AudioView.xaml @@ -200,7 +200,7 @@ VerticalAlignment="Center"
FontWeight="Bold"
Text="Bitrate"
- Visibility="{Binding CanSetBitrate,
+ Visibility="{Binding CannotSetBitrate,
Converter={StaticResource boolToVisConverter},
ConverterParameter=true}" />
<ComboBox Grid.Column="5"
@@ -210,7 +210,7 @@ ItemsSource="{Binding TrackReference,
Converter={StaticResource audioBitrateConverter}}"
SelectedItem="{Binding Bitrate}"
- Visibility="{Binding CanSetBitrate,
+ Visibility="{Binding CannotSetBitrate,
Converter={StaticResource boolToVisConverter},
ConverterParameter=true}" />
|