Skip to content

Explanation about audio data and how to playback in iOS using AudioToolbox

Notifications You must be signed in to change notification settings

DevCoop-code/iOS_AudioToolbox_Sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Explanation about audio data and how to playback in iOS using AudioToolbox

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published