The iOS AV Foundation framework provides the ability to record sound on the iPhone using the AVAudioRecorder class.
The goal of this articale is to create an iOS 4 iPhone application that will record and playback audio. It will do so by creating an instance of the AVAudioRecorder class and configuring it with a file to contain the audio and a range of settings dictating the quality and format of the audio. Playback of the recorded audio file will be performed using the AVAudioPlayer class.
Audio recording and playback will be controller by buttons in the user interface that are connected to action methods which, in turn, will make appropriate calls to the instance methods of the AVAudioRecorder and AVAudioPlayer objects respectively.
In this iphone voice recorder project you can Record / Pause / Resume and play the audio. In additionally I'm implemented timer for keep tracking the recording time like iphone's voice memo. I'm using the currentTime property of AVAudioRecorder (audioRecorder.currentTime) to get the time, in seconds, since the beginning of the recording which I used to display on label (see the screen shot).
Download demo:
You can download iphone voice recorder from here.
If this post was useful for you, please share this knowledge to your friends . Thanks..!
0 comments:
Post a Comment
Share your thoughts here...