ap4y / OrigamiEngine

Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
http://ap4y.github.com/OrigamiEngine/
MIT License
545 stars 118 forks source link

Lightweight iOS and OSX audio engine with opus, flac, cue, mp3, m4a, m3u support.

Supported formats

Features

Overview

Static library and cocoapods podspec provided. Static library can be compiled with embeeded FLAC library (check project targets). For OSX you can use static framework.

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 here.

Tests

OCUnit tests included into the project.

Credits

License

(MIT license)