views:

27

answers:

0

i'd like to save and play again this recorded sounds:

  @interface Recorder : NSObject
 {
   NSMutableArray *times;
   NSMutableArray *samples;
 }
@end

@implementation Recorder

 – (id) init
{
  [super init];
  times = [[NSMutableArray alloc] init];
  samples = [[NSMutableArray alloc] init];
  return self;
}

– (void) recordSound: (id) someSound
{
   CFAbsoluteTime now = CFAbsoluteTimeGetCurrent();
   NSNumber *wrappedTime = [NSNumber numberWithDouble:now];
   [times addObject:wrappedTime];
   [samples addObject:someSound];
}

@end

thanx blacksheep