diff options
author | dynaflash <[email protected]> | 2010-10-29 14:35:00 +0000 |
---|---|---|
committer | dynaflash <[email protected]> | 2010-10-29 14:35:00 +0000 |
commit | b6fa57df362e427de28ae05d043fe6795260aca0 (patch) | |
tree | a159a7a8a0dcbeec48b692f49287a1496019a32d /macosx/HBAudio.m | |
parent | 3a1b6a0ce8cad3c6030a5bbcf924d7d01043a03f (diff) |
MacGui: Audio - Using fallback codec no longer sets the bit rate from the preset. Setting the sample rate no longer sets the bit rate to the default if the currently selected bit rate is still supported.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3627 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx/HBAudio.m')
-rw-r--r-- | macosx/HBAudio.m | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/macosx/HBAudio.m b/macosx/HBAudio.m index 3be645456..721e104ba 100644 --- a/macosx/HBAudio.m +++ b/macosx/HBAudio.m @@ -325,7 +325,7 @@ static NSMutableArray *masterBitRateArray = nil; return; } -- (void) updateBitRates +- (void) updateBitRates: (BOOL) shouldSetDefault { NSMutableArray *permittedBitRates = [NSMutableArray array]; @@ -391,7 +391,9 @@ static NSMutableArray *masterBitRateArray = nil; [self setBitRates: permittedBitRates]; // Select the proper one - [self setBitRateFromName: defaultBitRate]; + if (YES == shouldSetDefault) { + [self setBitRateFromName: defaultBitRate]; + } if (nil == [self bitRate] || NO == [permittedBitRates containsObject: [self bitRate]]) { [self setBitRate: [permittedBitRates lastObject]]; @@ -464,7 +466,7 @@ static NSMutableArray *masterBitRateArray = nil; [codec release]; codec = aValue; [self updateMixdowns]; - [self updateBitRates]; + [self updateBitRates: YES]; } return; } @@ -476,12 +478,24 @@ static NSMutableArray *masterBitRateArray = nil; [aValue retain]; [mixdown release]; mixdown = aValue; - [self updateBitRates]; + [self updateBitRates: YES]; [[NSNotificationCenter defaultCenter] postNotificationName: HBMixdownChangedNotification object: self]; } return; } +- (void) setSampleRate: (NSDictionary *) aValue + +{ + if ((nil != aValue || nil != sampleRate) && NO == [aValue isEqual: sampleRate]) { + [aValue retain]; + [sampleRate release]; + sampleRate = aValue; + [self updateBitRates: NO]; + } + return; +} + - (NSArray *) tracks { return [controller masterTrackArray]; } - (NSArray *) sampleRates { return masterSampleRateArray; } |