summaryrefslogtreecommitdiffstats
path: root/macosx/HBAudioDefaults.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBAudioDefaults.m')
-rw-r--r--macosx/HBAudioDefaults.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/macosx/HBAudioDefaults.m b/macosx/HBAudioDefaults.m
index d6b184f33..693b29986 100644
--- a/macosx/HBAudioDefaults.m
+++ b/macosx/HBAudioDefaults.m
@@ -38,6 +38,13 @@
[super dealloc];
}
+- (void)addTrack
+{
+ HBAudioTrackPreset *track = [[HBAudioTrackPreset alloc] initWithContainer:self.container];
+ [self insertObject:track inTracksArrayAtIndex:[self countOfTracksArray]];
+ [track release];
+}
+
- (NSArray *)audioEncoderFallbacks
{
NSMutableArray *fallbacks = [[NSMutableArray alloc] init];
@@ -311,4 +318,26 @@
return self;
}
+#pragma mark KVC
+
+- (NSUInteger)countOfTracksArray
+{
+ return self.tracksArray.count;
+}
+
+- (HBAudioTrackPreset *)objectInTracksArrayAtIndex:(NSUInteger)index
+{
+ return self.tracksArray[index];
+}
+
+- (void)insertObject:(HBAudioTrackPreset *)track inTracksArrayAtIndex:(NSUInteger)index;
+{
+ [self.tracksArray insertObject:track atIndex:index];
+}
+
+- (void)removeObjectFromTracksArrayAtIndex:(NSUInteger)index
+{
+ [self.tracksArray removeObjectAtIndex:index];
+}
+
@end