avaudiorecorder

Writing ID3 tags via AVMetaDataItem

99封情书 提交于 2019-12-19 03:57:04
问题 I'm writing ID3 tags to a file using AVMetaDataItem var soundFileMetadata = [AVMetadataItem]() soundFileMetadata.append(createMetadata(AVMetadataiTunesMetadataKeyArtist, "MyArtist")!) soundFileMetadata.append(createMetadata(AVMetadataiTunesMetadataKeySongName, "MySong")!) soundFileMetadata.append(createMetadata(AVMetadataiTunesMetadataKeyAlbum, "MyAlbum")!) soundFileMetadata.append(createMetadata(AVMetadataiTunesMetadataKeyUserGenre, "MyGenre")!) soundFileMetadata.append(createMetadata

how to record audio as mp3 file by using AvAudiorecorder

佐手、 提交于 2019-12-19 02:38:33
问题 how to record audio as mp3 file by using AvAudiorecorder.i m using following code for recorder setting recordSetting1 = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithInt:AVAudioQualityMin],AVEncoderAudioQualityKey, [NSNumber numberWithInt:16], AVEncoderBitRateKey, [NSNumber numberWithInt: 2], AVNumberOfChannelsKey, [NSNumber numberWithFloat:44100.0], AVSampleRateKey,nil]; 回答1: Add [NSNumber numberWithInt:kAudioFormatMPEGLayer3] forKey:AVFormatIDKey However it's impossible to

AVAudioRecorder Record method returns NO at random times

倖福魔咒の 提交于 2019-12-18 19:06:47
问题 I’m currently developing an app which supports in-app audio recording. The user can get a standard tableview of locally saved audio files he/she have already recorded through the app, or press a button to go to a new recording view, from where it is possible to record a new audio session, which will automatically get saved to the apps sandbox. Now this function works well most of the time. I can record new files and play them from the app, but at random times the audio recorder will fail to

AVAudioRecorder averagePowerForChannel always returns -120.0

走远了吗. 提交于 2019-12-18 12:27:07
问题 I'm trying to use AVAudioRecorder's averagePowerForChannel method to monitor input levels on the microphone for an iPad/iPhone app. I have a callback which polls the average level in a loop — on the iPhone it works fine and returns sensible levels, but for some reason on the iPad it always returns -120.0. Here's some of my setup code: - (void) setupMic { if (micInput) { [micInput release]; micInput = nil; } NSURL *newURL = [[NSURL alloc] initFileURLWithPath:@"/dev/null"]; NSMutableDictionary

AVAudioSession Swift

拟墨画扇 提交于 2019-12-18 05:54:38
问题 I am trying to write a swift iOS app that will record the users voice. I have wrote the following code in swift however it fails to request mic permissions from the user. It prints granted yet it never records audio and in the settings pane under privacy it does not list the app. How do I request recording permissions in swift? var session: AVAudioSession = AVAudioSession.sharedInstance() session.requestRecordPermission({(granted: Bool)-> Void in if granted { println(" granted") session

Mac OS X Simple Voice Recorder

泄露秘密 提交于 2019-12-18 05:23:07
问题 Does anyone have some sample code for a SIMPLE voice recorder for Mac OS X? I would just like to record my voice coming from the internal microphone on my MacBook Pro and save it to a file. That is all. I have been searching for hours and yes, there are some examples that will record voice and save it to a file such as http://developer.apple.com/library/mac/#samplecode/MYRecorder/Introduction/Intro.html . The sample code for Mac OS X seems to be about 10 times more complicated than similar

iOS AVAudioSession interruption notification not working as expected

天大地大妈咪最大 提交于 2019-12-18 04:31:59
问题 I want to know when my AVAudioRecorder is inaccessible (e.g when music starts playing). As audioRecorderEndInterruption will be deprecated with iOS 9 I am focusing on AVAudioSession 's interruption notification (but neither is working as expected). The issue is that the interruption notification is never called if the app was and remains in the foreground when the interruption occurs. E.g: The user starts and stops playing music without moving the application into the background. To detect

how to resume recording after interruption occured in iphone?

余生颓废 提交于 2019-12-18 02:47:49
问题 I am working on an audio recorder application, it is working perfectly fine. But I'm stuck with the problem of interruption. When a call comes, - (void)audioRecorderBeginInterruption:(AVAudioRecorder *)recorder then this method is called and the recording is paused. And if the user rejects the call: - (void)audioRecorderEndInterruption:(AVAudioRecorder *)recorder Then here I want to resume the recording from the point where it was interrupted. But when I call the record method again, the

non-main bundle file as alert sound

送分小仙女□ 提交于 2019-12-17 20:39:17
问题 I'm hoping I'm wrong but I don't think it's possible. In the Local and Push Notification Programming Guide, under "Preparing Custom Alert Sounds" it says that "The sound files must be in the main bundle of the client application". If you can't write to the main bundle, then how can you get a user generated recording (using, say, AVAudioRecorder) to play as the alert sound? On the one hand it seems impossible, but on the other I think there are apps out there that do it (and I'll look for

Recording audio in mp3 format in an iPhone app

谁都会走 提交于 2019-12-17 18:24:45
问题 I am developing an iPhone app which records the audio in .wav format. Here is the code: NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc]init]; [recordSetting setValue :[NSNumber numberWithInt:kAudioFormatLinearPCM] forKey:AVFormatIDKey]; [recordSetting setValue:[NSNumber numberWithFloat:11025.0] forKey:AVSampleRateKey]; [recordSetting setValue:[NSNumber numberWithInt: 1] forKey:AVNumberOfChannelsKey]; [recordSetting setValue:[NSNumber numberWithInt:16] forKey