CodeEagle / APlay

A Better(Maybe) iOS Audio Stream、Cache、Play Framework
MIT License
60 stars 6 forks source link
audio audiounit avaudioengine basic digest flac framework id3v1 id3v1-1 id3v2 id3v2-3 id3v2-4 ios mp3 network player proxy streaming swift wave

APlay

A Better(Maybe) iOS Audio Stream & Play Swift Framework

Usage

import APlay
...
let url = URL(string: "path/to/audio/resource")!
let player = APlay()
player.eventPipeline.delegate(to: self, with: { (target, event) in
    //  event handling
})
player.play(url)
...

⚠️⚠️⚠️ Known issue

This project can only run in DEBUG mode,cause optimization mode will pause the decode loop.

if install with CocoaPods, add this block of code in your podfile

post_install do |installer|
 installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            swiftPods = ['APlay']
            if swiftPods.include?(target.name)
                config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] =  '-Onone'
            end
        end
    end
end

Docs

Run ./generate_docs.sh

Features

Installation

Carthage github "CodeEagle/APlay"

CocoaPods pod 'APlay'

Todo

License

License

Contact

Github, Twitter