avaudiorecorder

How to increase volume of sound recorded using AVAudioRecorder

扶醉桌前 提交于 2019-11-29 05:56:06
问题 I am using the link mentioned below to record audio through my iPhone app: How do I record audio on iPhone with AVAudioRecorder? When I try to play my recordings using AVAudioPlayer on my device, I have seen that the sound volume of my recordings is very low even when my device volume is full. Recording is working fine. What can be done to increase the volume? 回答1: When recording audio, set the audio session to AVAudioSessionCategoryPlayAndRecord or just AVAudioSessionCategoryRecord . When

iOS AVAudioSession interruption notification not working as expected

这一生的挚爱 提交于 2019-11-29 05:35:34
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 any interruptions I am using: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector

how to resume recording after interruption occured in iphone?

我只是一个虾纸丫 提交于 2019-11-28 23:50:02
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 recording starts with a new file. The problem is solved! I have re-written the recording code to avoid this

iPhone SDK: AVAudioRecorder metering — how to change peakPowerForChannel from decibel into percentage?

拥有回忆 提交于 2019-11-28 20:54:12
The AVAudioRecorder in the iPhone SDK can be used to get the peak and average power for a channel, in decibels. The range is between 0db to 160db. What is the calculation used to convert this into a scale between 0 - 10 or something similar that can be used for an audio level meter? The range is from -160 dB to 0 dB. You probably want to display it in a meter that goes from -90 dB to 0 dB. Displaying it as decibels is actually more useful than as a linear audio level, because the decibels are a logarithmic scale, which means that it more closely approximates how loud we perceive a sound. That

How to get array of float audio data from AudioQueueRef in iOS?

天大地大妈咪最大 提交于 2019-11-28 19:40:41
I'm working on getting audio into the iPhone in a form where I can pass it to a (C++) analysis algorithm. There are, of course, many options: the AudioQueue tutorial at trailsinthesand gets things started. The audio callback, though, gives an AudioQueueRef , and I'm finding Apple's documentation thin on this side of things. Built-in methods to write to a file, but nothing where you actually peer inside the packets to see the data. I need data. I don't want to write anything to a file, which is what all the tutorials — and even Apple's convenience I/O objects — seem to be aiming at. Apple's

Proper AVAudioRecorder Settings for Recording Voice?

。_饼干妹妹 提交于 2019-11-28 15:28:43
I am adding a voice memo capability using AVAudioRecorder and I need to know the best settings for the recorder for recording voice. Unfortunately, I know nothing about audio to the extent I am not even sure what terms to google for. Currently, I am using the following which I copied from somewhere for testing purposes: recorderSettingsDict=[[NSDictionary alloc] initWithObjectsAndKeys:[NSNumber numberWithInt:kAudioFormatAppleIMA4],AVFormatIDKey, [NSNumber numberWithInt:44100.0],AVSampleRateKey, [NSNumber numberWithInt: 2],AVNumberOfChannelsKey, [NSNumber numberWithInt:16]

non-main bundle file as alert sound

匆匆过客 提交于 2019-11-28 12:59:52
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 those). I solved this by copying a system sound file to ~/Library/Sounds directory and name it as

How to record an audio file in .mp3 format?

╄→гoц情女王★ 提交于 2019-11-28 09:23:18
I am using the following settings for recording audio file in .mp3 format using AVAudioRecorder. NSDictionary *recordSettings = [[NSDictionary alloc] initWithObjectsAndKeys: [NSNumber numberWithFloat: 44100.0],AVSampleRateKey, [NSNumber numberWithInt: kAudioFormatMPEGLayer3],AVFormatIDKey, [NSNumber numberWithInt: 1], AVNumberOfChannelsKey, [NSNumber numberWithInt: AVAudioQualityMax],AVEncoderAudioQualityKey,nil]; But not able to record with these. I searched a lot for this but wasn't able to get some relevant post. Some posts say that it is not possible.If its not possible then why so? Please

Recording audio in mp3 format in an iPhone app

佐手、 提交于 2019-11-28 07:04:31
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:AVLinearPCMBitDepthKey]; NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES

AVAudioRecorder / AVAudioPlayer - append recording to file

*爱你&永不变心* 提交于 2019-11-27 23:56:53
Is there any way to record onto the end of an audio file? We can't just pause the recording instead of stopping it, because the user needs to be able to come back to the app later and add more audio to their recording. Currently, the audio is stored in CoreData as NSData. NSData's AppendData does not work because the resulting audio file still reports that it is only as long as the original data. Another possibility would be taking the original audio file, along with the new one, and concatenate them into one audio file, if there's any way to do that. This can be done fairly easily using