summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudioController.m
diff options
context:
space:
mode:
authordynaflash <[email protected]>2011-05-19 19:21:43 +0000
committerdynaflash <[email protected]>2011-05-19 19:21:43 +0000
commit203d04750f93eb9d2b08cc5cb5b8ad2d28fad1ba (patch)
treeb8da6cf77df326ba434e0122bcd089641c8428ad /macosx/HBAudioController.m
parent7e816c6b262de7bf88914bb1e905b7ef68862989 (diff)
Macgui: libhb, MacGUI: reflect the fact that DRC only applies to non-passthru AC3 sources
- As per https://reviews.handbrake.fr/r/74/ -Patch by Rodeo, Thanks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3983 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudioController.m')
-rw-r--r--macosx/HBAudioController.m10
1 files changed, 9 insertions, 1 deletions
diff --git a/macosx/HBAudioController.m b/macosx/HBAudioController.m
index 55dfc9916..1a602b48e 100644
--- a/macosx/HBAudioController.m
+++ b/macosx/HBAudioController.m
@@ -91,7 +91,15 @@ NSString *HBMixdownChangedNotification = @"HBMixdownChangedNotification";
[aDict setObject: [[anAudio mixdown] objectForKey: keyAudioMixdownName] forKey: [prefix stringByAppendingString: @"Mixdown"]];
[aDict setObject: [[anAudio sampleRate] objectForKey: keyAudioSampleRateName] forKey: [prefix stringByAppendingString: @"Samplerate"]];
[aDict setObject: [[anAudio bitRate] objectForKey: keyAudioBitrateName] forKey: [prefix stringByAppendingString: @"Bitrate"]];
- [aDict setObject: [anAudio drc] forKey: [prefix stringByAppendingString: @"TrackDRCSlider"]];
+
+ if ((HB_ACODEC_AC3 == [[[anAudio track] objectForKey: keyAudioInputCodec] intValue]) &&
+ (HB_ACODEC_AC3_PASS != [[[anAudio codec] objectForKey: keyAudioCodec] intValue])) {
+ [aDict setObject: [anAudio drc] forKey: [prefix stringByAppendingString: @"TrackDRCSlider"]];
+ }
+ else {
+ // source isn't AC3 or output is passthru - the DRC dial is disabled so don't apply its value
+ [aDict setObject: [NSNumber numberWithInt:0] forKey: [prefix stringByAppendingString: @"TrackDRCSlider"]];
+ }
prefix = [NSString stringWithFormat: @"JobAudio%d", counter + 1];
[aDict setObject: [[anAudio codec] objectForKey: keyAudioCodec] forKey: [prefix stringByAppendingString: @"Encoder"]];