Commits

Nick Pellow committed 2e0e154

CONNECT-24: caf to aac for audio format

Comments (0)

Files changed (2)

JIRAConnect/JCOClasses/Core/JCORecorder.m

 	if ((self = [super init])) {
 		
 		self.recordTime = 10;
-		_recorderFilePath = [[NSString stringWithFormat:@"%@/jiraconnect-recording.caf", DOCUMENTS_FOLDER] retain];
-		
+		_recorderFilePath = [[NSString stringWithFormat:@"%@/jiraconnect-recording.aac", DOCUMENTS_FOLDER] retain];
+
 		// delete the previous recording.
         [self cleanUp];
 		
 		
 		NSMutableDictionary* recordSetting = [[[NSMutableDictionary alloc] init] autorelease];
 		
-		[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey];
-		[recordSetting setValue:[NSNumber numberWithFloat:22050] forKey:AVSampleRateKey]; 
-		[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];
-		
-		[recordSetting setValue :[NSNumber numberWithInt:8] forKey:AVLinearPCMBitDepthKey];
-		[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsBigEndianKey];
-		[recordSetting setValue :[NSNumber numberWithBool:NO] forKey:AVLinearPCMIsFloatKey];
-		
+		[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatMPEG4AAC] forKey:AVFormatIDKey];
 		
 		// Create a recording file	
 		NSURL *url = [NSURL fileURLWithPath:_recorderFilePath];

JIRAConnect/JCOClasses/JCOViewController.m

     JCOAttachmentItem *attachment = [[JCOAttachmentItem alloc] initWithName:@"recording"
                                                                        data:[_recorder audioData]
                                                                        type:JCOAttachmentTypeRecording
-                                                                contentType:@"audio/x-caf"
-                                                             filenameFormat:@"recording-%d.caf"];
+                                                                contentType:@"audio/aac"
+                                                             filenameFormat:@"recording-%d.aac"];
 
 
     UIImage *newImage = [UIImage imageNamed:@"icon_record_2"];