diff options
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; } } |