summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudioDefaults.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r--macosx/HBAudioDefaults.m16
1 files changed, 14 insertions, 2 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m
index 4905afa8a..dc43a0372 100644
--- a/macosx/HBAudioDefaults.m
+++ b/macosx/HBAudioDefaults.m
@@ -49,6 +49,15 @@
_trackSelectionBehavior = trackSelectionBehavior;
}
+- (void)setTrackSelectionLanguages:(NSMutableArray<NSString *> *)trackSelectionLanguages
+{
+ if (trackSelectionLanguages != _trackSelectionLanguages)
+ {
+ [[self.undo prepareWithInvocationTarget:self] setTrackSelectionLanguages:_trackSelectionLanguages];
+ }
+ _trackSelectionLanguages = trackSelectionLanguages;
+}
+
- (void)setAllowAACPassthru:(BOOL)allowAACPassthru
{
if (allowAACPassthru != _allowAACPassthru)
@@ -276,7 +285,10 @@
self.encoderFallback = hb_audio_encoder_get_from_name([preset[@"AudioEncoderFallback"] UTF8String]);
}
- [self.tracksArray removeAllObjects];
+ while ([self countOfTracksArray])
+ {
+ [self removeObjectFromTracksArrayAtIndex:0];
+ }
for (NSDictionary *track in preset[@"AudioList"])
{
@@ -303,7 +315,7 @@
newTrack.drc = [track[@"AudioTrackDRCSlider"] doubleValue];
newTrack.gain = [track[@"AudioTrackGainSlider"] doubleValue];
- [self.tracksArray addObject:newTrack];
+ [self insertObject:newTrack inTracksArrayAtIndex:[self countOfTracksArray]];
}
}