AVAudioRecorder - iphone

I have been working on an Audio Application where a user can record and play the recorded audio file. In my app during recording a user can pause the recording and play it to listen what he has recorded and then again he can continue the recording.
So now my question is that if a user have recorded a 20 seconds audio and when he plays the audio and wants to resume recording from over 10 seconds overlapping/discarding the next 10 seconds audio. ?
I have looked into the AVAudioRecorder documentation and there is not property to set the duration of the recorder to start recording from specific time. So please someone tell me if it is possible or not. ?
Thanks

Maybe there’s an easier solution, but you may want to look at AVMutableComposition. You can easily create an empty mutable composition, insert the recorded sound into an audio track and then edit the track as needed – delete segments, add another recording, etc.

Related

How can pause/resume recording audio from microphone in unity engine

In unity engine I want record audio from microphone with pause/resume ability; I want to have all of recorded audio in one AudioClip at final; and I don't know how many time it will pause and play (it's depend to user, not me) (also length of it) what can I do ?
Don't have ready made solution, but the way you should start is to use Microphone class and use its Start and End function to record audio. This returns an audio clip which can be save to a numbered file (e.g., audio_datetime_00001,audio_datetime_00002,...). Once user Play/Pause/Stop you can create a new audio file. Later you can merge them using NAudio (try Mark Heath's solution).
Happy coding!!!

Recording audio and playing iPod at the same time?

I am trying to be able to record audio through the iPhone's microphone while simultaneously playing music from the iPod.
The recording and playback work separately, but if I try to playback from the iPod and record at the same time the recording stops.
By the way, I am not actually recording the audio to save the sound file, but merely analyzing it. It's for my app that flashes to the beat of the music you play.
Does Apple just not allow record and playback at the same time?
You should be able to do this by setting the Audio Session to AVAudioSessionCategoryPlayAndRecord. Information on this is in the Apple docs, although admittedly the Core Audio documentation is (and has always been) lacking in clarity.
AVSession Class Reference
Also, it's worth noting that AVAudioRecorder and AVAudioPlayer automatically set the session for you. You can wrestle control and set the session manually using the key I highlighted above.
the problem may be you are recording audio to the same path where the playing file is saved.
try to play an audio from a url with AVAudioPlayer and you can record with AVAudioRecorder at the same time.
Cheers :) :)

overwriting part of Audio during recording in iPhone

Is it possible to overwrite a part of the recording with another recording.
When a recording is done, user gets back to a particular point of time in recording.
And right from that time, he initiates a recording, and this should overwrite the earlier recording.
Is this possible with AVFoundation Framework available in iPhone?

Recording and then Playing Audio using AVAudioRecorder and AVAudioPLayer

I have an AVAudioRecorder that captures the sound. What I want is to be able to Play(AVAudioPlayer) the recorded(AVAudioRecorder) sound as it is being recorded.
I have set up the AVAudioSession property to playandRecord... but I dont know how do I program the following sort of scenario?
Like you have your head phones on and you are walking,some one beeps at you, but u can't listen because of your headphones on, but what if your iPhone captures that beep and plays right away.
If i am recording and playing on the same file at the same time. Will that be a problem?
Any help regarding this would be anticipated.
No there is no problem in that. recording and playing on the same file at the same time

Record AVAudioPlayer output using AVAudioRecorder

In my application, I have list of Buttons when i click on one button corresponding music will be played. I want to record the sounds coming while playing the audio using avaudioplayer. But when i start recording while playing sounds nothing is recorded, Is it possible to record the sounds from avaudioplayer.
Thank You.
You might like to check-out this thread.