本文共 2230 字,大约阅读时间需要 7 分钟。
OrigamiEngine
Lightweight iOS and OSX audio engine with opus, flac, cue, mp3, m4a, m3u support.
轻量级iOS,OSX音频处理工具,支持opus, flac, cue, mp3, m4a, m3u
Supported formats
opus
, flac
, mp3
, m4a
, wav
and other from CoreAudio 支持的文件格式包括opus
, flac
, mp3
, m4a
, wav
以及其他CoreAudio支持的类型 cue
, m3u 支持播放列表
Features
Overview
Static library and podspec
provided. Static library can be compiled with embeeded FLAC library (check project targets). For OSX you can use static framework.
提供静态库或者cocoapods.静态库可用来编译嵌入FLAC的库,在OSX上,你可以使用静态库.
Start playback: 开始播放:
self.player = [[ORGMEngine alloc] init];NSURL* url = [NSURL URLWithString:tfUrl.text];[_player playUrl:url];
Common operations: 常用的操作:
[_player metadata]; // current metadata[_player pause]; // pause playback[_player resume]; // resume playback[_player stop]; // stop playback[_player seekToTime:seekSlider.value]; // seek to second[_player setNextUrl:url withDataFlush:YES]; // play next track and clear current buffer
Delegate methods: 代理方法:
- (NSURL*)engineExpectsNextUrl:(ORGMEngine*)engine; // provides continious playback- (void)engine:(ORGMEngine*)engine didChangeState:(ORGMEngineState)state; // state change callback
Check example project and tests for the additional information.
Documentation
Project headers contain appledoc
comments, precompiled docset .
工程头文件件中包含了appledoc的描述.
Tests
OCUnit
tests included into the project.
Credits
Cog
sources转载地址:http://logox.baihongyu.com/