Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

iPhone SDK Tutorial - Recording And Playing Back Audio

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
3,939
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Mar 17, 2011

News: We have our first app in the store now, The Clickulator, a simple to use counting app with many different features. Available in the app store for only £0.59 or $0.99. http://is.gd/LwtzUm

In this tutorial you will learn to record some audio and play it back. In this instance the audio is saved to a temporary file VoiceFile which is accessed through a variable called temporaryRecFile.

Subscribe for more tutorials in the future.

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (iWorldApps)

  • great video, just one remark. Watch out for programming anti patterns! The variable name isNotRecording is such an antipattern, because it will confuse people who read through the code.

    Better use a variable name "isRecording" because then it is clear that true=recording and no=not recording

  • @mschorer Very good point, its definatley best to keep your code clear. In this tutorial it was done in the way that i personally would do it. Thanks for clarifying for us!

  • could i do this with live sound coming in and out

  • @chasethemooseinc it Is possible, yes as you can have multiple sound channels within the iPhone SDK. Sorry for the delayed reply.

  • @iWorldApps how would i do that

  • @chasethemooseinc By default you can play multiple sounds. However, it might not be possible to actually record a sound whilst you have your own sound playing back. The best possible route is to try it out, would only take some minor tampering with the code above so that that no buttons are ever disabled.

see all

All Comments (23)

Sign In or Sign Up now to post a comment!
  • Thanks!

  • @CitydriftSL works without problems on Xcode 4 and iOS sdk 5.

  • is this possible with Xcode 4?

    if i follow your tutorial it doesn't work :(

  • @iWorldApps how do i pause the audio that i have recorded and then is playing?

    so i dont need to listen to everything i have recorded if i dont want to.

    and how should i do so when i have recorded something and then want to add something to that recFile?

    So both things i recorded is in the temporaryRecFile

  • @Chilling1993 and one more thing :P

    how do i loop the sound?

  • great vid! just wonder 2 things. now when i press the play button a couple of times in a row the sound starts to play "over it self". how should i do so when i press the play button the second time the sound just stop?

    and how should i change the code so i record the output audio instead?

  • the playback didnt worked.. and the file is not stored..please fix..

  • Need some help! I want the file to be saved and compressed a bit so i can access it later in a folder or something. Also i want it to record very low sounds like on distance, is it possible to make it more like sensitive?

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more