diff options
author | dynaflash <[email protected]> | 2010-02-23 18:07:07 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-02-23 18:07:07 +0000 |
commit | 4de954484ea3b2bac3d48e502acb616e2b6779c1 (patch) | |
tree | 7f3796f0daf7bfed1e0e3ee621ae270149954c11 /macosx | |
parent | 779e39b064f80824671610e3c58ad4792eefa6ba (diff) |
MacGui: Audio fixes regarding CoreAudio as default.
- Base Patch by Rodeo, thanks Rodeo!
-- Puts CoreAudo at index 0 in the encoder popup to assure it is selected by default if no preset is applied.
-- Fixes issue where going to AC3 or DTS Passthru then back to aac chose faac even if the old "Use CoreAudo instead of FAAC" pref was in effect.
-- Removes some legacy AVI/OGM Code.
- Additional features added after Base Patch:
-- "Use CoreAudio instead of FAAC" preference is now only applied to the built in presets
--- This change means that a custom preset specifying faac is now respected instead of it being overridden by the previously global preference.
--- Xib description changed accordingly
--- Note this means that previous custom presets that used faac will now use it instead of coreaudio.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3138 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 86 | ||||
-rw-r--r-- | macosx/English.lproj/Preferences.xib | 23 |
2 files changed, 34 insertions, 75 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 8c0df1394..c9219aad1 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -5586,14 +5586,12 @@ the user is using "Custom" settings by determining the sender*/ { case 0: /* MP4 */ - // FAAC - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_FAAC]; - // CA_AAC menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (CoreAudio)" action: NULL keyEquivalent: @""]; [menuItem setTag: HB_ACODEC_CA_AAC]; - + // FAAC + menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""]; + [menuItem setTag: HB_ACODEC_FAAC]; // AC3 Passthru menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""]; [menuItem setTag: HB_ACODEC_AC3]; @@ -5601,12 +5599,12 @@ the user is using "Custom" settings by determining the sender*/ case 1: /* MKV */ - // FAAC - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_FAAC]; // CA_AAC menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (CoreAudio)" action: NULL keyEquivalent: @""]; [menuItem setTag: HB_ACODEC_CA_AAC]; + // FAAC + menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AAC (faac)" action: NULL keyEquivalent: @""]; + [menuItem setTag: HB_ACODEC_FAAC]; // AC3 Passthru menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""]; [menuItem setTag: HB_ACODEC_AC3]; @@ -5620,26 +5618,6 @@ the user is using "Custom" settings by determining the sender*/ menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"Vorbis (vorbis)" action: NULL keyEquivalent: @""]; [menuItem setTag: HB_ACODEC_VORBIS]; break; - - case 2: - /* AVI */ - // MP3 - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"MP3 (lame)" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_LAME]; - // AC3 Passthru - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"AC3 Passthru" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_AC3]; - break; - - case 3: - /* OGM */ - // Vorbis - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"Vorbis (vorbis)" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_VORBIS]; - // MP3 - menuItem = [[audiocodecPopUp menu] addItemWithTitle:@"MP3 (lame)" action: NULL keyEquivalent: @""]; - [menuItem setTag: HB_ACODEC_LAME]; - break; } [audiocodecPopUp selectItemAtIndex:0]; } @@ -5911,37 +5889,19 @@ the user is using "Custom" settings by determining the sender*/ } /* In the case of a source track that is not AC3 and the user tries to use AC3 Passthru (which does not work) - * we force the Audio Codec choice back to a workable codec. We use MP3 for avi and aac for all - * other containers. + * we force the Audio Codec choice back to a workable codec. We use CoreAudio aac for all containers. */ if (audio->in.codec != HB_ACODEC_AC3 && [[audiocodecPopUp selectedItem] tag] == HB_ACODEC_AC3) { - /* If we are using the avi container, we select MP3 as there is no aac available*/ - if ([[fDstFormatPopUp selectedItem] tag] == HB_MUX_AVI) - { - [audiocodecPopUp selectItemWithTag: HB_ACODEC_LAME]; - } - else - { - [audiocodecPopUp selectItemWithTag: HB_ACODEC_FAAC]; - } + [audiocodecPopUp selectItemWithTag: HB_ACODEC_CA_AAC]; } /* In the case of a source track that is not DTS and the user tries to use DTS Passthru (which does not work) - * we force the Audio Codec choice back to a workable codec. We use MP3 for avi and aac for all - * other containers. + * we force the Audio Codec choice back to a workable codec. We use CoreAudio aac for all containers. */ if (audio->in.codec != HB_ACODEC_DCA && [[audiocodecPopUp selectedItem] tag] == HB_ACODEC_DCA) { - /* If we are using the avi container, we select MP3 as there is no aac available*/ - if ([[fDstFormatPopUp selectedItem] tag] == HB_MUX_AVI) - { - [audiocodecPopUp selectItemWithTag: HB_ACODEC_LAME]; - } - else - { - [audiocodecPopUp selectItemWithTag: HB_ACODEC_FAAC]; - } + [audiocodecPopUp selectItemWithTag: HB_ACODEC_CA_AAC]; } /* Setup our samplerate and bitrate popups we will need based on mixdown */ @@ -6831,8 +6791,9 @@ return YES; } [self audioTrackPopUpChanged: trackLangPopUp]; [audiocodecPopUp selectItemWithTitle:[tempObject objectForKey:@"AudioEncoder"]]; - /* check our pref for core audio and use it in place of faac if applicable */ - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + /* check our pref for core audio and use it in place of faac if preset is a built in */ + if ([[chosenPreset objectForKey:@"Type"] intValue] == 0 && + [[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && [[tempObject objectForKey:@"AudioEncoder"] isEqualToString: @"AAC (faac)"]) { [audiocodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; @@ -6926,12 +6887,14 @@ return YES; } [self audioTrackPopUpChanged: fAudLang1PopUp]; [fAudTrack1CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Encoder"]]; - /* check our pref for core audio and use it in place of faac if applicable */ - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + /* check our pref for core audio and use it in place of faac if preset is built in */ + if ([[chosenPreset objectForKey:@"Type"] intValue] == 0 && + [[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && [[chosenPreset objectForKey:@"Audio1Encoder"] isEqualToString: @"AAC (faac)"]) { [fAudTrack1CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; } + [self audioTrackPopUpChanged: fAudTrack1CodecPopUp]; [fAudTrack1MixPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio1Mixdown"]]; /* check to see if the selections was available, if not, rerun audioTrackPopUpChanged using the codec to just set the default @@ -6958,8 +6921,9 @@ return YES; } [self audioTrackPopUpChanged: fAudLang2PopUp]; [fAudTrack2CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio2Encoder"]]; - /* check our pref for core audio and use it in place of faac if applicable */ - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + /* check our pref for core audio and use it in place of faac if preset is built in */ + if ([[chosenPreset objectForKey:@"Type"] intValue] == 0 && + [[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && [[chosenPreset objectForKey:@"Audio2Encoder"] isEqualToString: @"AAC (faac)"]) { [fAudTrack2CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; @@ -6989,8 +6953,9 @@ return YES; } [self audioTrackPopUpChanged: fAudLang3PopUp]; [fAudTrack3CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio3Encoder"]]; - /* check our pref for core audio and use it in place of faac if applicable */ - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + /* check our pref for core audio and use it in place of faac if preset is built in */ + if ([[chosenPreset objectForKey:@"Type"] intValue] == 0 && + [[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && [[chosenPreset objectForKey:@"Audio3Encoder"] isEqualToString: @"AAC (faac)"]) { [fAudTrack3CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; @@ -7020,8 +6985,9 @@ return YES; } [self audioTrackPopUpChanged: fAudLang4PopUp]; [fAudTrack4CodecPopUp selectItemWithTitle:[chosenPreset objectForKey:@"Audio4Encoder"]]; - /* check our pref for core audio and use it in place of faac if applicable */ - if ([[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && + /* check our pref for core audio and use it in place of faac if preset is built in */ + if ([[chosenPreset objectForKey:@"Type"] intValue] == 0 && + [[NSUserDefaults standardUserDefaults] boolForKey: @"UseCoreAudio"] == YES && [[chosenPreset objectForKey:@"Audio4Encoder"] isEqualToString: @"AAC (faac)"]) { [fAudTrack4CodecPopUp selectItemWithTitle:@"AAC (CoreAudio)"]; diff --git a/macosx/English.lproj/Preferences.xib b/macosx/English.lproj/Preferences.xib index 6eea5da2b..b38c37610 100644 --- a/macosx/English.lproj/Preferences.xib +++ b/macosx/English.lproj/Preferences.xib @@ -3,16 +3,16 @@ <data> <int key="IBDocument.SystemTarget">1050</int> <string key="IBDocument.SystemVersion">10C540</string> - <string key="IBDocument.InterfaceBuilderVersion">732</string> + <string key="IBDocument.InterfaceBuilderVersion">740</string> <string key="IBDocument.AppKitVersion">1038.25</string> <string key="IBDocument.HIToolboxVersion">458.00</string> <object class="NSMutableDictionary" key="IBDocument.PluginVersions"> <string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string> - <string key="NS.object.0">732</string> + <string key="NS.object.0">740</string> </object> <object class="NSMutableArray" key="IBDocument.EditedObjectIDs"> <bool key="EncodedWithXMLCoder">YES</bool> - <integer value="233"/> + <integer value="235"/> </object> <object class="NSArray" key="IBDocument.PluginDependencies"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -60,14 +60,10 @@ <string key="NSMaxSize">{1.79769e+308, 1.79769e+308}</string> </object> <object class="NSUserDefaultsController" id="580534391"> - <object class="NSMutableArray" key="NSDeclaredKeys"> - <bool key="EncodedWithXMLCoder">YES</bool> - <string>SendCompletedEncodeToApp</string> - </object> <bool key="NSSharedInstance">YES</bool> </object> <object class="NSCustomView" id="1048779201"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -567,12 +563,11 @@ </object> </object> <string key="NSFrameSize">{492, 236}</string> - <reference key="NSSuperview"/> <string key="NSClassName">NSView</string> <string key="NSExtension">NSControl</string> </object> <object class="NSCustomView" id="520288288"> - <reference key="NSNextResponder"/> + <nil key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -581,7 +576,6 @@ <int key="NSvFlags">268</int> <string key="NSFrame">{{34, 42}, {432, 17}}</string> <reference key="NSSuperview" ref="520288288"/> - <reference key="NSWindow"/> <bool key="NSEnabled">YES</bool> <object class="NSTextFieldCell" key="NSCell" id="374363387"> <int key="NSCellFlags">67239488</int> @@ -599,13 +593,11 @@ </object> </object> <string key="NSFrameSize">{496, 82}</string> - <reference key="NSSuperview"/> - <reference key="NSWindow"/> <string key="NSClassName">NSView</string> <string key="NSExtension">NSResponder</string> </object> <object class="NSCustomView" id="332598366"> - <nil key="NSNextResponder"/> + <reference key="NSNextResponder"/> <int key="NSvFlags">256</int> <object class="NSMutableArray" key="NSSubviews"> <bool key="EncodedWithXMLCoder">YES</bool> @@ -941,7 +933,7 @@ <object class="NSButtonCell" key="NSCell" id="787274685"> <int key="NSCellFlags">-2080244224</int> <int key="NSCellFlags2">131072</int> - <string key="NSContents">Use CoreAudio instead of FAAC for preset default encoder</string> + <string key="NSContents">Use CoreAudio instead of FAAC for Built-In Presets</string> <reference key="NSSupport" ref="26"/> <reference key="NSControlView" ref="1054432492"/> <int key="NSButtonFlags">1211912703</int> @@ -956,6 +948,7 @@ </object> </object> <string key="NSFrameSize">{492, 91}</string> + <reference key="NSSuperview"/> <object class="NSMutableString" key="NSClassName"> <characters key="NS.bytes">NSView</characters> </object> |