https://github.com/CodeEagle/APlay
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
https://github.com/CodeEagle/APlay
audio audiounit avaudioengine basic digest flac framework id3v1 id3v1-1 id3v2 id3v2-3 id3v2-4 ios mp3 network player proxy streaming swift wave
Last synced: 23 days ago
JSON representation
A Better(Maybe) iOS Audio Stream、Cache、Play Framework
- Host: GitHub
- URL: https://github.com/CodeEagle/APlay
- Owner: CodeEagle
- License: mit
- Created: 2018-07-09T02:06:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-23T08:24:07.000Z (almost 5 years ago)
- Last Synced: 2025-04-08T23:47:44.985Z (28 days ago)
- Topics: audio, audiounit, avaudioengine, basic, digest, flac, framework, id3v1, id3v1-1, id3v2, id3v2-3, id3v2-4, ios, mp3, network, player, proxy, streaming, swift, wave
- Language: Swift
- Homepage:
- Size: 5.01 MB
- Stars: 63
- Watchers: 6
- Forks: 6
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE
Awesome Lists containing this project
README
APlay
---
A Better(Maybe) iOS Audio Stream & Play Swift FrameworkUsage
---
```Swift
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
```ruby
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
---
- [x] CPU-friendly design to avoid excessive peaks- [x] Support seek on WAVE, and FLAC(with seektable)
- [x] Support all type of audio format(MP3, WAVE, FLAC, etc...) that iOS already support(Not fully tested)
- [x] Digest(Tested), Basic(not tested) proxy support
- [x] Multiple protocols supported: ShoutCast, standard HTTP, local files
- [x] Prepared for tough network conditions: restart on failures,restart on not full content streamed when end of stream
- [x] Metadata support: ShoutCast metadata, ID3V1, ID3v1.1, ID3v2.2, ID3v2.3, ID3v2.4, FLAC metadata
- [x] Local disk storing: user can add folders for local resource loading
- [x] Playback can start immediately without needing to wait for buffering
- [x] Support cached the stream contents to a file
- [x] Custom logging module and logging into file supported
- [x] Open protocols to support customizing. `AudioDecoderCompatible`, `ConfigurationCompatible`, `LoggerCompatible`...
Installation
---
[Carthage](https://github.com/Carthage/Carthage) `github "CodeEagle/APlay"`[CocoaPods](https://cocoapods.org/) `pod 'APlay'`
Todo
---
- [ ] Airplay2 support(Maybe not)
- [ ] AudioEffectUint supportLicense
---
[License](LICENSE)Contact
---
[Github](https://github.com/CodeEagle), [Twitter](https://twitter.com/_SelfStudio)