avaudiorecorder

AVAudioRecorder and AirPlay Mirrioring

自闭症网瘾萝莉.ら 提交于 2020-01-04 08:06:07
问题 When I have an AVAudioRecorder Session active - (when I'm recording audio) I can't activate AirPlay mirroring on the device. Airplay mirroring just deactivates while the app is running and switches it back on when the app exits. This post seems to suggest there is no way around this. My thoughts are to try: using a lower level recording framework or outputting a separate window to external display, rather than mirroring (I've tried this, it doesn't work). Is there another way around this, or

AVAudioRecorder and AirPlay Mirrioring

别等时光非礼了梦想. 提交于 2020-01-04 08:06:07
问题 When I have an AVAudioRecorder Session active - (when I'm recording audio) I can't activate AirPlay mirroring on the device. Airplay mirroring just deactivates while the app is running and switches it back on when the app exits. This post seems to suggest there is no way around this. My thoughts are to try: using a lower level recording framework or outputting a separate window to external display, rather than mirroring (I've tried this, it doesn't work). Is there another way around this, or

Problem using AVAudioRecorder

瘦欲@ 提交于 2020-01-03 04:28:07
问题 I am facing a strange problem with AVAudioRecorder. In my application i need to record audio and play it. I am creating my player as : if(recorder) { if(recorder.recording) [recorder stop]; [recorder release]; recorder = nil; } NSString * filePath = [NSHomeDirectory() stringByAppendingPathComponent: [NSString stringWithFormat:@"Documents/%@.caf",songTitle]]; NSDictionary *recordSettings = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithFloat: 44100.0],AVSampleRateKey,

How to convert .caf Audio file into .mp4 file in swift

非 Y 不嫁゛ 提交于 2020-01-02 16:58:11
问题 I'm recording audio using device microphone with AVAudioRecorder which return file in .caf format that is playable only in Apple devices but not on Android devices. Since Apple is not supporting .mp3 file so I want to convert it in .mp4 format before uploading to server. Is .mp4 is good for audio only? Can I convert it with AVAssetExportSession ? Following is audio recorder code: func setupAudioRecorder () { let fileMgr = FileManager.default let dirPaths = fileMgr.urls(for:.documentDirectory,

How to convert .caf Audio file into .mp4 file in swift

穿精又带淫゛_ 提交于 2020-01-02 16:58:08
问题 I'm recording audio using device microphone with AVAudioRecorder which return file in .caf format that is playable only in Apple devices but not on Android devices. Since Apple is not supporting .mp3 file so I want to convert it in .mp4 format before uploading to server. Is .mp4 is good for audio only? Can I convert it with AVAssetExportSession ? Following is audio recorder code: func setupAudioRecorder () { let fileMgr = FileManager.default let dirPaths = fileMgr.urls(for:.documentDirectory,

iPhone SDK: AVAudioRecorder will not record after calling [AVPlayer play]

为君一笑 提交于 2020-01-01 05:13:06
问题 I have a view controller that uses AVPlayer. this view controller can load a modal view controler where the user can record audio using AVAudioRecorder. this is what happens: if the user plays the composition in the fist controller with [AVPLayer play] the AVAudioRecorder will not record in the modal view controller. there are no errors but the current time returned by AVAudioRecorder is 0.0; if the user dismisses the modal dialog and reloads it. AVAudioRecorder works fine. this can be

Seemingly random file corruption using AVAudioRecorder (Sometimes the file can't be played back) - iOS

限于喜欢 提交于 2019-12-31 22:03:31
问题 In an app I'm currently developing, I've more or less hit a brick wall. In the application you can enter a view which lists all locally saved audio files in a standard table view. From here you can click on them to play them, or hit a record button below to make a new recording, which will afterwards automatically get saved to the apps sandbox. Now all of this actually works perfectly fine, most of the time. I can sit and make recordings and play them back. I can sit and test this on and on

How can I Access/extract raw(headless) audio data from a caf file on iPhone?

微笑、不失礼 提交于 2019-12-30 06:38:48
问题 I am working on a project that requires me to send raw headerless ulaw or linear pcm data to a server. I am using the AVAudioRecorder and I can save out audio files to the phone quite easily, but the problem is that it no matter what I try and do, they get wrapped in a caf file or stamped with some kind of header. It's my understanding that a caf file is just a wrapper file for raw audio data and that this audio data can be in various formats including linear pcm and ulaw. So my questions are

How to record voice in .m4a format

流过昼夜 提交于 2019-12-30 02:28:12
问题 Already I have created an iPhone application to record. It will record in .caf file. But I want to record in .m4a format. Please help me to do this. Thanks. 回答1: Here is an alternative code sample that will encode the file as AAC inside an m4a: NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir = [dirPaths objectAtIndex:0]; NSURL *tmpFileUrl = [NSURL fileURLWithPath:[docsDir stringByAppendingPathComponent:@"tmp.m4a"]];

How to record voice in .m4a format

烈酒焚心 提交于 2019-12-30 02:28:05
问题 Already I have created an iPhone application to record. It will record in .caf file. But I want to record in .m4a format. Please help me to do this. Thanks. 回答1: Here is an alternative code sample that will encode the file as AAC inside an m4a: NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docsDir = [dirPaths objectAtIndex:0]; NSURL *tmpFileUrl = [NSURL fileURLWithPath:[docsDir stringByAppendingPathComponent:@"tmp.m4a"]];