Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7849639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:35:27+00:00 2026-06-02T18:35:27+00:00

How do you record an audio in a view and getting the saved audio

  • 0

How do you record an audio in a view and getting the saved audio file after popping out in the parent view?

I am using embedded navigation controller in storyboard.

I have this code in my child view.

NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);

NSString *docsDir = [dirPaths objectAtIndex:0];

tempFilePath = [NSURL fileURLWithPath:[docsDir stringByAppendingPathComponent:[NSString stringWithFormat: @"record.%@", @"caf"]]];


NSMutableDictionary* recordSetting = [[NSMutableDictionary alloc] init];
[recordSetting setValue :[NSNumber numberWithInt:kAudioFormatAppleIMA4] forKey:AVFormatIDKey];
[recordSetting setValue:[NSNumber numberWithFloat:44100.0] forKey:AVSampleRateKey]; 
[recordSetting setValue:[NSNumber numberWithInt: 2] forKey:AVNumberOfChannelsKey];


audioRecorder = [[ AVAudioRecorder alloc] initWithURL:tempFilePath settings:recordSetting error:nil];
[audioRecorder setDelegate:self];

[audioRecorder prepareToRecord];

[audioRecorder record];

Now, how am I gonna get that in my parent controller?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T18:35:28+00:00Added an answer on June 2, 2026 at 6:35 pm

    If you have one view controller recording audio, that view controller should save the audio before it gets dismissed.

    And you should save it to a consistent place (e.g. a cache directory, a documents directory, whatever). And if you give it a predictable filename, you can have your parent view controller easily locate it to load it up again when needed.

    Alternatively, you could get a handle to your parent view controller from the navigation controller and pass along either the path to the written out audio data (or a URL), or the raw audio NSData object itself. It all depends on how you’ve implemented your code.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using AVAudioRecorder to record audio and save to a wav file (using
I want to Record audio but with some background images in out put file.
I am trying to record audio in C# using NAudio. After looking at the
how can i record audio file as .m4a format. i am using the code
How to record audio as an mp3 file by using AvAudiorecorder? I am using
I am using the Audio Queue services to record audio on the iPhone. I
I am using the AVAudioRecorder class available with the 3.0 SDK to record audio
I'd like to record the audio coming from my iPhone app. So after the
I try to record audio using android ndk. people say I can use frameworks/base/media/libmedia/AudioRecord.cpp.
I m using a microphone class to record audio from user. I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.