diff options
author | ritsuka <[email protected]> | 2014-08-10 15:15:10 +0000 |
---|---|---|
committer | ritsuka <[email protected]> | 2014-08-10 15:15:10 +0000 |
commit | c50899dd7361801c04463fe1630392500608ebab (patch) | |
tree | 557dc901bd1f50294ff7953cf5726216c918dbe9 /macosx/HBAudioTrackPreset.m | |
parent | c7c2aa9ee6c73dcb6b693471945aeadb6ed09983 (diff) |
MacGui: fixed gain validation in the audio panel. Remove the drc validation because it’s not possible to insert the value manually.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6284 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudioTrackPreset.m')
-rw-r--r-- | macosx/HBAudioTrackPreset.m | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/macosx/HBAudioTrackPreset.m b/macosx/HBAudioTrackPreset.m index dc829874b..099cb6045 100644 --- a/macosx/HBAudioTrackPreset.m +++ b/macosx/HBAudioTrackPreset.m @@ -115,35 +115,21 @@ static void *HBAudioEncoderContex = &HBAudioEncoderContex; return retval; } -// Because we have indicated that the binding for the drc validates immediately we can implement the -// key value binding method to ensure the drc stays in our accepted range. -- (BOOL)validateDrc:(id *)ioValue error:(NSError *)outError -{ - BOOL retval = YES; - - if (nil != *ioValue) - { - if (0.0 < [*ioValue floatValue] && 1.0 > [*ioValue floatValue]) - { - *ioValue = @(1.0); - } - } - - return retval; -} - // Because we have indicated that the binding for the gain validates immediately we can implement the // key value binding method to ensure the gain stays in our accepted range. - - (BOOL)validateGain:(id *)ioValue error:(NSError *)outError { BOOL retval = YES; if (nil != *ioValue) { - if (0.0 < [*ioValue floatValue] && 1.0 > [*ioValue floatValue]) + if ([*ioValue intValue] < -20) + { + *ioValue = @(-20); + } + else if ([*ioValue intValue] > 20) { - *ioValue = @(0.0); + *ioValue = @20; } } |