3
由於我從iPhone錄製音頻如下:什麼在iPhone錄製的音頻格式支持,並在Android中扮演過
//Setup the dictionary object with all the recording settings that this
//Recording sessoin will use
NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey];
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];
//Now that we have our settings we are going to instanciate an instance of our recorder instance.
//Generate a temp file for use by the recording.
NSDate *now = [NSDate dateWithTimeIntervalSinceNow:0];
NSString *caldate = [now description];
recordedTmpFile = [[NSString stringWithFormat:@"%@/%@.caf", DOCUMENTS_FOLDER, caldate] retain];
NSLog(@"Using File called: %@",recordedTmpFile);
url = [NSURL fileURLWithPath:recordedTmpFile];
error = nil;
//Setup the recorder to use this file and record to it.
recorder = [[ AVAudioRecorder alloc] initWithURL:url settings:recordSetting error:&error];
但我的問題是應用程序,我開發也爲Android開發的,但爲iPhone和Android使用通用服務器。當我將錄製的音頻從iPhone發佈到服務器,並試圖在Android中播放音頻時,它會將警報顯示爲不受支持的文件。
我應該記錄哪種格式來播放iPhone和Android音頻的任何幫助?
任何人的幫助將深受讚賞。