syedhali / EZAudio

An iOS and macOS audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.
Other
4.93k stars 821 forks source link

how to recorde audio from last stopped state #349

Open sahabe1 opened 7 years ago

sahabe1 commented 7 years ago

Hi I want to recorder audio file for 10 second then stop again i start recording is possible to start recording from 11 second

just want to append new reorder to previous recorded file .

kosso commented 7 years ago

If you don't perform closeAudioFile, then you should be able to set an isRecording boolean flag to decide if to append data or not, while the mic is fetching.

eg:

- (void)   microphone:(EZMicrophone *)microphone
        hasBufferList:(AudioBufferList *)bufferList
       withBufferSize:(UInt32)bufferSize
 withNumberOfChannels:(UInt32)numberOfChannels
{
    if (self.isRecording)
    {
        [self.recorder appendDataFromBufferList:bufferList
                                 withBufferSize:bufferSize];
    }
}