轻量级的 iOS 和 OSX 音频引擎,支持 opus,flac,cue,mp3,m4a,m3u。
opus
,flac
,mp3
,m4a
,wav
和来自 CoreAudio 的其他文件cue
,m3u
提供了静态库和 cocoapods podspec
。静态库支持编译嵌入 FLAC 库(检查项目目标)。对于 OSX,您可以使用静态框架。
开始播放
self.player = [[ORGMEngine alloc] init];
NSURL* url = [NSURL URLWithString:tfUrl.text];
[_player playUrl:url];
常见操作
[_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
委托方法
- (NSURL*)engineExpectsNextUrl:(ORGMEngine*)engine; // provides continious playback
- (void)engine:(ORGMEngine*)engine didChangeState:(ORGMEngineState)state; // state change callback
检查示例项目和测试以获取更多信息。
项目头文件包含 appledoc
注释,预编译的 docset 在此处可获得:http://ap4y.github.com/OrigamiEngine/Documentation/index.html。
项目包括 OCUnit
测试。
Cog
源文件。(MIT 许可证)