AVFoundation provides a controller class
AVPlayer to play timed audio-visual media. The AVPlayer can handle playback of local, progressively downloaded and streamed media conforming HLS protocol.
AVAsset is an abstract, immutable class providing a composite representation of a media resource, modeling the static attributes of the media as a whole, such as its title, duration, and metadata. AVAsset is not the media itself, but acts as a container for timed media. It is composed of one or more media tracks along with metadata describing its contents.
AVAudioRecorder is also built on top of Audio Queue Services. It provides capability to:
- Record until user stop the recording
- Record for a specified duration
- Pause and resume recording
- Audio-level metering
AVAudioPlayer makes easy to playback the audio data from local files and memory. It is built on top of Core Audio’s C-based Audio Queue Service. It provides all core functions we can find in Audio Queue Service.
I will talk about NSTimer in this order.
- Initial a NSTimer
- Invalidate a NSTimer
- NSTimer and runloop