Note that there are some explanatory texts on larger screens.

plurals
  1. POiOS - Overwrite the particular audio recording In specific time
    text
    copied!<p>Hi I need to develop an app that can record, play, stop and overwrite audio. I have done the Recording by using <code>AvAudioRecorder</code>:</p> <pre><code>NSDictionary *audioSettings = [NSDictionary dictionaryWithObjectsAndKeys: [NSNumber numberWithFloat: 44100],AVSampleRateKey, [NSNumber numberWithInt: kAudioFormatLinearPCM],AVFormatIDKey, [NSNumber numberWithInt: 2],AVNumberOfChannelsKey, [NSNumber numberWithInt: AVAudioQualityLow], AVEncoderAudioQualityKey, nil]; self.audioRecorder = [[AVAudioRecorder alloc] initWithURL:audioFileURL settings:audioSettings error:nil]; [sliderTimer invalidate]; [self.audioRecorder record]; sliderTimer = [NSTimer scheduledTimerWithTimeInterval:0.2 target:self selector:@selector(updateSlider) userInfo:nil repeats:YES]; </code></pre> <p>...and playback is done using <code>AVplayer</code>.</p> <p>But I dont know how to overwrite the recording. This the outline of my overwrite implementation:</p> <ol> <li>Stop Recording</li> <li>Move the slider position to the particular point</li> <li>Then, start recording.</li> </ol> <p>This is the functionality to overwrite the previous recordings.</p> <p>So, As per the steps I have written </p> <pre><code>[self.audioRecorder stop]; [[self audioSlider] setValue:self.audioSlider.value animated:YES]; [self.audioRecorder recordAtTime:self.audioSlider.value forDuration:self.audioSlider.maximumValue]; </code></pre> <p>...but its not working. Instead, they totally re-record the file. Could any body help me for this critical situation.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload