iosiphoneswiftaudioaudioqueueservices

Saving last 30 seconds of audio in file using audio queue iOS api


I am using Audio Queue API for recording audio using buffers, I followed apple guide link .I want only last 30 seconds to be saved in the file in documents directory but this guide saves all the audio once a buffer if filled.


Solution

  • I managed to save only last 30 seconds using the buffer size of 30 seconds and in the end writing the data of buffer in a file.