Skip to content

Latest commit

 

History

History
38 lines (28 loc) · 1.62 KB

README.md

File metadata and controls

38 lines (28 loc) · 1.62 KB

iOS using Audio

iOS offers a rich set of tools for working with sound
Here is the link of basic concept of audio

  • AVFoundation Framework
    • To play and Record audio using a simple interface
  • Audio Toolbox
    • To Play audio with synchronization capabilities, access packets of incoming audio, parse audio streams, convert audio formats, and record audio with access to individual packets
  • OpenAL
    • To Provide positional audio playback in games and other applications

The Basics: Audio Codecs, Supported Audio Formats, and Audio Sessions

iOS Hardward and Software Audio codecs

Below is table about iOS Audio playback formats and codecs
AudioPlaybackFormats_Codecs
Software codecs support simultaneous playback of multiple sounds, but may entail significant CPU overhead
Hardware codecs support only a single instance of one of the supported formats at a time

iOS Audio Framework Introduction

  • CoreAudio & AudioToolboxare the low-level C frameworks
  • AVFoundation is an Objective-C/Swift framework
  • AVAudioEngine is part of AVFoundation

How to test sample project

Each sample projects don’t contain test video files due to file's copyright

Proceed as follows steps

  1. Add your audio files into each sample projects

  2. change some codes for video file name and extension into ViewController.swift

    1. ex) audioFileURL = Bundle.main.url(forResource: "SimpsonMovie", withExtension: "mp4")
  3. Run and Play