diff options
author | dynaflash <[email protected]> | 2011-05-19 19:21:43 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2011-05-19 19:21:43 +0000 |
commit | 203d04750f93eb9d2b08cc5cb5b8ad2d28fad1ba (patch) | |
tree | b8da6cf77df326ba434e0122bcd089641c8428ad | |
parent | 7e816c6b262de7bf88914bb1e905b7ef68862989 (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
-rw-r--r-- | libhb/work.c | 2 | ||||
-rw-r--r-- | macosx/HBAudioController.m | 10 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libhb/work.c b/libhb/work.c index 29dac4d7a..eac0c0ad7 100644 --- a/libhb/work.c +++ b/libhb/work.c @@ -354,7 +354,7 @@ void hb_display_job_info( hb_job_t * job ) } } - if ( audio->config.out.dynamic_range_compression && (audio->config.out.codec != HB_ACODEC_AC3_PASS) && (audio->config.out.codec != HB_ACODEC_DCA_PASS)) + if ( audio->config.out.dynamic_range_compression && (audio->config.in.codec == HB_ACODEC_AC3) && (audio->config.out.codec != HB_ACODEC_AC3_PASS) ) { hb_log(" + dynamic range compression: %f", audio->config.out.dynamic_range_compression); } 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"]]; |