save and play recorded sound

Posted by blacksheep on Stack Overflow See other posts from Stack Overflow or by blacksheep
Published on 2010-06-07T09:44:01Z Indexed on 2010/06/07 10:12 UTC
Read the original article Hit count: 222

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about iphone-sdk

Related posts about audio-recording