相关疑难解决方法(0)

通过SDK在iPhone上录制mp3

我想知道是否可以用Xcode以编程方式录制mp3格式的音频文件.

我已经阅读了大量的文件,我已经用Google搜索了,但没有结果.

请帮忙,如果有人知道这是怎么回事?

iphone audio xcode mp3 audio-recording

5
推荐指数
1
解决办法
4498
查看次数

iPhone中录制的音频格式也支持和播放Android

当我从iphone录制音频时如下:

//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 …
Run Code Online (Sandbox Code Playgroud)

iphone android objective-c audio-recording ios

5
推荐指数
1
解决办法
2674
查看次数

标签 统计

audio-recording ×2

iphone ×2

android ×1

audio ×1

ios ×1

mp3 ×1

objective-c ×1

xcode ×1