Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Lightweight audio engine for iOS and OSX with flac, cue, mp3, m4a, m3u support.
Objective-C Ruby

Use constant 48khz sampling rate for all opus files.

Previously used sampling rate of original stream, according to the docs
should be always 48khz.

updates #57
latest commit 0bbdc3c534
ap4y authored

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

Supported formats

  • Audio sources: http and local files
  • Audio files: opus, flac, mp3, m4a, wav and other from CoreAudio
  • Playlists: cue, m3u


  • Ligthweight: 300kb compiled, 1.2mb with libFLAC
  • Small memory foorprint: no more than 2.5mb for the flac files
  • Low resource consumption: about 14% CPU usage for FLAC on ipod 4g
  • All operations in background with GCD
  • Event-based (using dispatch sources and CoreAudio async api)
  • Provides full audio metadata (vorbis, id3 tags) with embeeded cover images
  • HTTP data caching
  • Tested (currently about 85% code coverage)


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.


Project headers contain appledoc comments, precompiled docset here.


OCUnit tests included into the project.


  • by Vincent Spader. FLAC decoder implementation based on Cog sources


(MIT license)

Something went wrong with that request. Please try again.